Hacker News new | ask | show | jobs
by roboguy12 3430 days ago
My experience with kotlin so far has been great. I've used it in personal projects, and am in the process of converting some microservices at work to it from java (the interop is seamless, so I'm able to do it incrementally as opposed to a full rewrite). People ask me what the difference is between kotlin and java, and I typically reply with "it's java, minus all the bad stuff". Variable types are inferred, map/reduce/filter are builtins and don't require going through a Stream, there's no need for Guava anymore since listOf() and mapOf() are builtin, boilerplate-reducers like data classes continue to speak to the whole "it's pretty much java, but how you _want_ to write it" mantra. It nails all of the little things that java has just missed, like in an if-block after checking a variables instanceof, you don't need to explicitly cast it to that type. There are tons of simple things like this that just come for free, and when you go back to java it's amazing how much extra, pointless boilerplate you need to write. I personally don't see any reason for me to ever write java again.