That being said, I just can't get excited about new language features now that I have discovered Kotlin. It is essentially Java but with a much smarter compiler and a more modern and sane syntax.
That being said, I just can't get excited about new language features now that I have discovered Kotlin. It is essentially Java but with a much smarter compiler and a more modern and sane syntax.
The designers basically removed everything that made Scala slow to process and hard to optimize. As a side-effect, Kotlin is much easier to read and understand than Scala.
No. It's not.
(E.g. as applications get larger you tend to need to understand the reasons for why something didn't happen, so you move from Option on to using an Either-style type that carries some information in the failure case. But Kotlin is hardcoded around using null to express absence and it's impossible to migrate from that to something that includes a reason).
Also, I notice that, as I write type-safe code, I don't usually compile that often and, when it compiles, it is likely correct.
The incremental compilation is pretty good.
None of the new features has anything to do with dynamic languages[0]. Streams and lambdas are still statically typed.
[0] Well, there is DynamicInvoke, but this is not a Java feature, but a JVM feature.
I usually use groovy for my fun/toy projects but at my day job writing enterprise code the tests have huge JSON building blocks before the actual assertion happens.
If I'm trying to test how my system will parse a specific JSON case into a domain object, isn't it easier to read if my test case is completely expressed on the screen?
Even when I develop in Python with multiline strings I use fixture files to better organise my code.
Edit: removed an "even" before maintainability that was part of a first draft.
They should have stuck to their original mission of reducing programming mistakes and boosting productivity.
String processing, a la perl, Python, is something every single developer does every day. We need multilines, intrinsics, first class regexes, etc. every day.
They should have made 'utf8', 'utf16', etc first class scalars, reducing the memory footprint of java.lang.String, and everything reliant on String, ages ago.
They should have increased conciseness, a la Kotlin, Ceylon, Nice, Boo (minus the duck typing), ages ago.
I'm also eager for lightweight objects (value types?), a la Kava, which I think has been pushed back to JDK 10.