Hacker News new | past | comments | ask | show | jobs | submit login

Still looks like Java.



Not even a bad thing. It's a pragmatic JVM language. It's 100% interoperable with Java without baggage like Groovy has. It's probably going to look like Java. Scala can look like Java if you write it very imperatively. What's nice about Kotlin is that the language supports idioms that allow you do diverge from "looking like Java" as you write it more.


Hope we never see "looks exactly like Java syntax but behaves differently when you run it" like we see in Apache Groovy, e.g. their == operator acts differently to Java's.


Pretty much every language's `==` operator acts differently and more sanely when compared to Java's.

Groovy had a very different initial design philosophy compared to Kotlin. The Groovy design philosophy was give Java developers a good highly-dynamic scripting language that still felt like Java but also made it more suitable for writing quick and dirty plugins, scripts and other extension bits to Java programs.

Kotlin is more in the "Java is great already, but has a lot of legacy issues, let's take all the stuff learned in the last two decades and make a Java++"


It's OK for a JVM language to define things differently to Java but still "feel like Java", but it should also have enough syntactic differences so programmers know it isn't Java. The Wikipedia page for Apache Groovy says "Most Java code is also syntactically valid Groovy, although semantics may be different" which isn't a good design.


Kotlin does precisely that, I'm afraid. :P

`a == b` compiles to `a.equals(b)`, if you want reference equality you need to type `a === b`.


Not past the first day. Kotlin code can be beautiful, and I've yet to see beautiful Java code.


Right off the bat, rolling nullability into the static typechecker is a significant break from Java.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: