3 ms·
java was never really a bad language. the people were. if not massive over-engineering. too many abstract concepts that make it hard to grasp a codebase. code
by dzonga 3y ago
java was never really a bad language.
the people were. if not massive over-engineering. too many abstract concepts that make it hard to grasp a codebase.
code voodoo - in the form of reverse GOTO statement i.e annotations
DI frameworks .
what needs fixing is not the language but the ecosystem. there needs to be a "reformation" movement within the java ecosystem.
yeah people migrating to kotlin or clojure or scala isn't enough.
- _gabe_ 3y ago100% agree. You can create a HammerFactoryFactory to churn out HammerFactories in any language. But the ecosystem in Java (and C# is similar imo) promotes and encourages this type of problem solving. The one thing Java really does need is free standing (or namespaced) functions though. Sometimes I don’t want a class, what’s wrong with a function in a module or namespace in that case?
- MagicMoonlight 3y agoA class is a module/namespace. You can make a class just to have functions in it.
- _gabe_ 3y agoIt’s not though. In lots of languages a namespace can span multiple files, whereas a class must be declared in a single file[0][1]. Modules can usually contain a collection of functions and classes. And namespaces can also contain multiple classes/structure/functions and sometimes modules depending on the language[2]. [0]: https://www.typescriptlang.org/docs/handbook/namespaces-and-modules.html https://www.typescriptlang.org/docs/handbook/namespaces-and-... [1]: https://learn.microsoft.com/en-us/cpp/cpp/namespaces-cpp?view=msvc-170 https://learn.microsoft.com/en-us/cpp/cpp/namespaces-cpp?vie... [2]: https://learn.microsoft.com/en-us/dotnet/fsharp/language-reference/namespaces https://learn.microsoft.com/en-us/dotnet/fsharp/language-ref...