3 ms·
Java-the-language was designed to be anti-clever, but a decade later, most code written in it ended up being the epitome of hyper-cleverness. Lack of abstracti
by unscaled 7y ago
Java-the-language was designed to be anti-clever, but a decade later, most code written in it ended up being the epitome of hyper-cleverness.
Lack of abstractions (a.k.a "cleverness") on the language level, pushed developers to abstraction on the code level, often based on reflection and supported by XML files and (later) annotations.
In retrospect, by avoiding cleverness in Java, we ended up with multiple incompatible framework dialects which implement their own cleverness.
Go avoided this fate so far by having weaker support for reflection, and since the collective developer memory of Java framework excesses is all too fresh. This makes Go code more readable than Java on average, but I don't think it's any more readable than idiomatic code in a high-abstraction language like Rust, Kotlin or Swift - once you learn and internalize how these languages work.
- UK-AL 7y agoJava style design patterns are often just a crutch for the lack of abstraction in the language.
- apta 7y agogolang has its "patterns" as well, which are quite badly designed. Java's modeling and abstraction capabilities way supersede what golang has to offer. This is much better now especially after Java 8 and continues to evolve.
- apta 7y ago> but a decade later, most code written in it ended up being the epitome of hyper-cleverness Citation needed. > we ended up with multiple incompatible framework dialects which implement their own cleverness. The trend for a while now is using libraries on a per-need basis. E.g. [1]. This also doesn't sit with reality based on the different JEPs available, and standardizations like JPA. > but I don't think it's any more readable than idiomatic code in a high-abstraction language like Rust, Kotlin or Swift I haven't used Swift of Rust in a significant manner, but golang is way less readable than Kotlin, and modern Java (8+). [1] https://quarkus.io/ https://quarkus.io/