Why is Java bad that way? Overly complex classes? In my experience, C++ is particularly awful, since careless programming can lead to memory corruption, use-after-free, and nonlocal malfunctions and crashes.
Why is Java bad that way? Overly complex classes? In my experience, C++ is particularly awful, since careless programming can lead to memory corruption, use-after-free, and nonlocal malfunctions and crashes.
If nothing in the architecture can just be a free-floating procedure, not even a pure function, the system architecture will evolve around this
- Store data
- Simple convenience functions that tell me about its state
- Side-effect-free mutations (or data massaging) that have no external dependencies other than function params
- Simple validation, if there are no external dependencies
Everything else goes in a service/function.
One anti-pattern/code smell I often see is finding classes in a service which should just be a functionally pure pipeline (eg. no internal state is managed)
That has never sat well with any kind of source control where you are expressing your ideas with line oriented patches.
I only code with JavaSE and only use 2 external dependencies (original json and dns4j, both minimalist and written by one man each), that said Java probably has the leanest API that has ever existed and potentially that will ever exist.