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

Boring.

I'll tell you a little secret, Java is the number one programming language in the world just because it is used by millions of programmers for Android apps and a few enslaved programmers in corporate gulags. Once Kotlin takes the Android world by storm Java will sit next to Cobol in the history books of technology.



At one point Scala was going to take over the world. It was hot favorite of many fastest growing companies. Then the companies grew and moved to Java with or without much fuss.

Your secret does seem like secret to lot of people. In my knowledge Java is big because lots and lots of companies use Java stack for boring enterprise applications. And in those places people could care less about cool stuff and work on things that pays.

Cobol is still used in very critical software at big Banks. Java along with it quite respectful place. Whereas Kotlin is a little bit of lot of things. Runs of JS/JVM/Native but none of them a unique strength for Kotlin. So it will be very difficult to compete with languages which committed to single platform and have serious business use cases.


One of Kotlin's design goals was 100% compatibility with java.

Whenever I work on a java-codebase and see a class that could be expressed much simpler in Kotlin I press "Cmd+Option+Shift+K".

Intellij IDEA automatically converts this file to Kotlin. The codebase continues to work without issues and I can proceed extending this part in Kotlin.


You hugely underestimate how much of large corporations work in java. Android, compared to the enterprise software, is peanuts.


Our enterprise used a lot of Oracle (e.g. Java) products but never committed to actual Java development. As of late they have been heavily divesting themselves of Oracle as rapidly as possible.


> Java is the number one programming language in the world just because it is used by millions of programmers for Android apps and a few enslaved programmers in corporate gulags

This is an incorrect and terribly biased opinion. I have been working primarily in Java for over five years and neither of those applies to me. Java has been a core language in ML and NLP for at least a decade.


In what language and runtime will Kotlin run on?


Kotlin is a language that runs on JVM6.


That's true, but don't forget Kotlin also compiles to plain JavaScript, and a native compiler is in the works too.


Yea, but the benefits of any jvm language fall of a cliff without the jvm.


Without the libraries, performance or profiling tools that Java has, so it remains to be seen how much uptake it will have.


Kotlin is 100% java-compatible, you can mix source-files side-by-side in one project. You can easily call kotlin from java and java from kotlin.

That means you have all the libraries, performance and profiling tools that java has.


Not when targeting "plain JavaScript, and a native compiler is in the works too".

Please read the OP before commenting.


Agreed, sorry.


Well, without the libraries and profiling tools anyway ;-)


Nowadays this means nothing because everything compiles to plain JavaScript.


Will Kotlin on Android run on a JVM or ART? Or do I have a fundamental misunderstanding of things?


On Android it runs on ART.

But Android tooling is heavy dependent on Java and Google even had to drop their Jack/Jill compiler replacement, because they weren't able to make it work properly with all the tooling that targets the JVM.

So they pivoted to translating JVM bytecodes into ART ones (originally Dalvik ones, DEX) again.

However even with the way Google has handled the Java story, the whole Android eco-system is heavyly dependent on it.

They also pivoted the Brillo project with the promise of a set of C++ userspace frameworks, into Android Things using Java instead, including the ability to write device drivers in Java.

Hence why thinking that Kotlin can manage without Java and its eco-system is kind of strange, even on Android.

EDIT: Of course it runs on Dalvik as well when targeting pre-Lolipop devices.


Thanks! I don't do native development on Android <gasp!> so I only follow the comings and goings superficially.


Yes. You can mix Kotlin and Java in the same-project. Kotlin can call all Java-code and Java can call all Kotlin-code.




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

Search: