4 ms·
I've been using Kotlin lately, and while I do enjoy it, I'm not sure that it actually makes me more productive compared to Java. I haven't yet used coroutines,
by insertnickname 8y ago
I've been using Kotlin lately, and while I do enjoy it, I'm not sure that it actually makes me more productive compared to Java. I haven't yet used coroutines, but if anything in Kotlin is a killer feature, I suspect coroutines are it. The lack of a decent way to write concurrent/async programs lead Java programmers to use over-complicated solutions like Rx.
Rx is cool and definitely a good solution for some cases, but if what you really want is just to talk to your database without blocking the thread, then it's way overkill. Just give me async/await like C#.
I'm a bit concerned about Kotlin code tending towards being overly concise and clever, especially with the IntelliJ refactoring suggestions that constantly pop up to entice me to make my code a few characters shorter. Of course, "my IDE told me to do it" is no excuse, it's my responsibility to write clear code.
One of the things I like about Go is the tendency to write straight forward code that reads easily from top to bottom. Java has a bit of this tendency too (if you forego the kind of all too common libraries that require you to instantiate 14 objects to do even the simplest things). Java has already become much less noisy with type inference for local variables.
Java code doesn't have to look like this, Java programmers are doing it to themselves:
HttpURLConnection httpConnection = (HttpURLConnection) new URL(url).openConnection();
httpConnection.setRequestMethod("POST");
- deleted 8y ago[deleted]