Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Deservedly so. It is a great language, and it's backed by the ultra-power JVM. You can use a hipster language with great features and still use JodaTime and maven and all the enterprise stuff that just works.


What exactly make it a great language? What are the advantages compared to Java? I search for it but couldn't find any simple answer to that question. The fact that things are shorter to declare doesn't make it better. It makes it less readable.


I haven't used Kotlin, but glancing over their comparison page the one that jumped out to me was that it (almost) eliminates the possibility of null pointer exceptions: https://kotlinlang.org/docs/reference/null-safety.html


This is my litmus test to determine whether a modern language is not terrible. Why wouldn't you want to eliminate an entire class of errors?

Unfortunately, my day to day language at work is Go.


This is like an entry-level expectation for a modern language. Hardly something to write home about in this day and age.


It is when you bring it first-party to a platform the size of Java.

The userbase of Objective-C was much smaller before OSX brought Cocoa to the Mac ecosystem.


> The fact that things are shorter to declare doesn't make it better. It makes it less readable.

That's not a hard and fast rule. There are obvious inflection points. A 200 character long identifier is less readable than a 20 character identifier in almost all cases. A 1 character identifier is less readable than a 8 character identifier in almost all cases. Somehwhere between those extremes is the sweet spot, and it's likely somwhat different depending on person.

As for language keywords, as long as they are unique, unambiguous, and not likely to conflict with written code often, shorter is likely better since it's purely a matter of learning them when learning the language. Given those constraints, it's easy to see it's possible to be too short though (any single character keyword that is not context sensitive is likely a horrible choice).


OK. Let's start writing 1 letter variables then. Shorter code. Better code.


The only way this comment makes sense is if you completely misunderstood what I said.


A wide array of quality of life changes to Java.

> The fact that things are shorter to declare doesn't make it better.

This is debatable. In fact, shorter code could (but not always, of course) mean less room for error and more room to hold higher abstractions. Boilerplate is a less efficient use of cognitive energy.


Agreed, with an exception of magic non-standard out-of-context characters (#$=%>^<) with non-intuitive language-specific meanings; see bash, perl, angular... I prefer short textual keywords 99% of the time


For advantages (and some disadvantages!) compared to Java, I'd start with https://kotlinlang.org/docs/reference/comparison-to-java.htm....


Agreed.




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

Search: