4 ms·
(just my opinion) I find java mentally exhausting. I have only ever worked with java once, and it was long ago when I just began my career over 6 years ago. S
by mradek 4y ago
(just my opinion)
I find java mentally exhausting. I have only ever worked with java once, and it was long ago when I just began my career over 6 years ago.
Since then I mostly work with typescript and go on backend, and the languages are quite simple and strange code can be understood quickly without having to dive too much into documentation and navigating a million folders/layers of OO abstraction.
I've tried getting back into java and each time I just get exhausted looking at the code.
- dandigangi 4y agoSimilar feelings towards Java. Kotlin has been a refreshing change to read by comparison at my new job. Much less exhausting.
- kubota 4y agoThe problem with Kotlin is that Java copies its features pretty quickly. So as time progresses, the benefit gap between the two languages diminishes, and eventually will not justify switching ecosystems. For example, Project Loom is the answer to coroutines. Sealed classes, etc. Up until recently, Kotlin was not a 1st class supported language for Bazel, gRPC, etc.
- synthc 4y agoI'm fine with Java copying features. I'm happy to use Kotlin now while it is ahead, no problem with switching back to Java once it catches up.
- yukinon 4y agoThis approach breaks down when thinking about teams in a large organization. Language switches are a big deal.
- dandigangi 4y agoThe time for this to happen though is a long cycle though since Java holds such heavy backwards compatibility though right?
- za3faran 4y agoIn addition to Loom being superior to async/await, Java's pattern matching is shaping up to be better than Kotlin's, and Java's string templates (https://openjdk.org/jeps/430 https://openjdk.org/jeps/430) are also superior to Kotlin's.
- wiseowise 4y agoSuperior how?
- yCombLinks 4y agoThat's not necessarily due to java. I have a guy on my team (we're a java shop) with completely exhausting code. Everything is layers and miles of indirection. No one else here does that. It is admittedly more common in the java world though.
- kamaal 4y agoNo, it is fairly common among Java devs. In fact the culture there is that way. Most happen to come from banking sector, and other deep enterprise structures where things tend to move slowly. Design Pattern abuse is super common, and is widely used as a 'smartness signalling' tool. Generally it is not that much of a problem given attrition rates in those places is low. But it does cause lots of pain for people who join the team. I was the happiest with when Python grew, not having to deal with things like 300 classes just to make a ping to some REST end point was a welcome thing.
- za3faran 4y agoYou can issue an HTTP request in Java quite easily: https://docs.oracle.com/en/java/javase/19/docs/api/java.net.http/java/net/http/HttpClient.html https://docs.oracle.com/en/java/javase/19/docs/api/java.net....
- kamaal 4y agoYeah Java people don't go the 'quite easy' way. They want some 10 indirections of builder classes to merely build the url alone. Then a factory class to create the connection etc. Then some response handlers to deal with the response. Then some dozens of classes to parse the response. By the time you work around this you are lost in the forest of classes.
- za3faran 4y agoNot sure why the hyperbole. It's literally one class for the client, and one for the request, probably the least you could do without things getting too hard coded.