by sreque · 9y ago · 0 comments
I think you can design and build perfectly fine software in Java, but the problem to solve is education of software developers. Most software developers can't be bothered to learn basic PL theory or deeply learn multiple programming languages that are very different from each other. As such, when they think about how to solve problems in code, their thoughts are heavily influenced by their primary language.
In this case, what we see from the "best" java developers is the kind of coding you can expect if the only language you ever learn is Java. A more extreme case of this is Perl. Some of the most crazy, convoluted, unnecessarily complex code I've ever seen comes from the Perl community. Now, you can write somewhat normal code in Perl, but the community often doesn't, and the language itself certainly doesn't encourage it.
As to your concern that FP and OOP can't be unified, I don't see this as Scala's core problem. Scala's core problem is that a vocal part of the community wants to use Scala as a worse Haskell, and the other part wants to use it as a better Java. I think Scala will be most successful if instead someone figures out the best way to design software in a Scala-specific way, and I don't think anyone has successfully done that yet, although people are certainly trying.
Martin Odersky, for instance, long ago introduced the cake pattern, something that was fairly scala-specific and represented a new design pattern. Unfortunately, the cake pattern ended up being a bit of a disaster! Since then, he has pushed the idea of "modular" programming, where Scala embraces more of it's ML roots (https://pellucidanalytics.github.io/blog/scalas-modular-root...). I haven't been following the community well enough to know if this kind of thinking ever took off further or not, or if there are other avenues of exploration currently in development.
At the end of the day, Scala is a research language, except the research is more focused on: how can I take existing non-mainstream PL ideas and integrate them into a practical, production-ready language? That research, for better or worse, is still ongoing in my opinion. The only way to validate the research is to try new ideas in production environments and see what works and what doesn't.
What kind of nonsense is this? You can't casually dismiss an entire generation of programmers who built all the systems we take for granted today.
Incidentally, my favorite libraries and services in Java have little do with things like DI frameworks, ORM libraries, aspect weaving, or any other strange abuses of annotations. For instance, in my opinion ZooKeeper is one of the best open source services of its kind.
Netty, while it has some warts, is pretty amazing and seems to show up everywhere as a dependency in other libraries and services.
I'm not an expert on them by any means, but the Java-written NoSQL services like Cassandra and HBase seem impressive as well, and seem very competitive in their respective areas.
"Language serves not only to express thought but to make possible thoughts which could not exist without it" - Bertrand Russell