Live data from Hacker News

Kotlin, the Swift of Android

blog.gouline.net

21–30 of 114 posts

Re: Kotlin, the Swift of Android

#21
post #15

It's an important point in Kotlin's favour that it's developed by JetBrain, the company that makes Google's official Android IDE. If/when Google decides it's time to sanction a Java replacement on Android, the language designed by their tool provider seems like the obvious choice.

Minor correction. We don't make Android Studio. Android Studio is based off of the IntelliJ IDEA platform, which is what we develop.

Re: Kotlin, the Swift of Android

#22
post #21
post #15

It's an important point in Kotlin's favour that it's developed by JetBrain, the company that makes Google's official Android IDE. If/when Google decides it's time to sanction a Java replacement on Android, the language designed by their tool provider seems like the obvious choice.

Minor correction. We don't make Android Studio. Android Studio is based off of the IntelliJ IDEA platform, which is what we develop.

[deleted]

Re: Kotlin, the Swift of Android

#23

Earlier quoted context omitted.

No, but older Android versions have a maximum 64000 method limit. I think it has been fixed for later versions, but I am really not sure. There have been some blog posts about Facebook's (controversial) attempts to work around this limit: https://www.facebook.com/notes/facebook-engineering/under-th...

Android 4.0 introduced a new set of Dalvik instructions that supported larger methods IDs, but they were never used and were eventually removed. ART may have lifted the method limit, but I haven't seen any specific mention of it.

ART does not lift it. I was at the I/O session where the ART team explicitly stated that.

Re: Kotlin, the Swift of Android

#24
post #9

Earlier quoted context omitted.

It's way more fucked up than that, Dalvik is limited to 65k invocable methods per dex file: https://medium.com/@rotxed/dex-skys-the-limit-no-65k-methods... > You can reference a very large number of methods in a DEX file, but you can only invoke the first 65536, because that’s all the room you have in the method invocation instruction. > […] the limitation is on the number of methods referenced, not the number of met…

Is this limitation going away (or otherwise obviated) by ART?

No it's not - the limitation is part of DEX file format (it only has 16-bit method counter). ART is a runtime which runs these DEX files so it can't help there.

To change this, Google would have to update the file format and somehow ensure dual format compatibility when running.

Re: Kotlin, the Swift of Android

#25
post #13

It would be nice if more of this was folded into Java itself, rather than existing as a new language - as the author notes a lot of it is in Java 8.

Java 8 does introduce a few features that are available in Kotlin, but AFAIK Java 8 won't be available for Android for some time. In addition, Kotlin makes a lot of constructs more succinct, including but not limited class definitions. So it's not only about what it adds, but what it "takes away" too IMHO.

> AFAIK Java 8 won't be available for Android for some time

Pretty sure it will never be available on Android. Best case scenario Google moves away from it. Worst case, it will add some new, similar features to Dalvik VM. But I doubt they are considering adopting Java 8.

Re: Kotlin, the Swift of Android

#26
post #21
post #15

It's an important point in Kotlin's favour that it's developed by JetBrain, the company that makes Google's official Android IDE. If/when Google decides it's time to sanction a Java replacement on Android, the language designed by their tool provider seems like the obvious choice.

Minor correction. We don't make Android Studio. Android Studio is based off of the IntelliJ IDEA platform, which is what we develop.

Oh, thanks for the correction. I had assumed that JetBrain develops Android Studio and Google just puts their stamp on it.

Re: Kotlin, the Swift of Android

#27
post #9

Earlier quoted context omitted.

It's way more fucked up than that, Dalvik is limited to 65k invocable methods per dex file: https://medium.com/@rotxed/dex-skys-the-limit-no-65k-methods... > You can reference a very large number of methods in a DEX file, but you can only invoke the first 65536, because that’s all the room you have in the method invocation instruction. > […] the limitation is on the number of methods referenced, not the number of met…

Is this limitation going away (or otherwise obviated) by ART?

Yes, but not just yet:

https://plus.google.com/107130354111162483072/posts/VEy3JChn...

Mentioned at about 27:55 in this podcast where a member of the ART team is interviewed: http://androidbackstage.blogspot.se/2014/08/android-develope...

Re: Kotlin, the Swift of Android

#28
post #7

I have been fiddling with Kotlin for last few days. It is trivial to get it working in Android Studio, which is a plus already. It's not nearly as verbose as Java, and for one thing, it gives me LINQ that I've been missing from C#.

How well does the bytecode convert with RoboVM?

Re: Kotlin, the Swift of Android

#29
post #15

It's an important point in Kotlin's favour that it's developed by JetBrain, the company that makes Google's official Android IDE. If/when Google decides it's time to sanction a Java replacement on Android, the language designed by their tool provider seems like the obvious choice.

That's putting the cart before the horse. Google's already shown with the Dart project that they're willing to invest in building tools for their own technology. Android Studio hasn't been the official Android IDE for very long either.

Re: Kotlin, the Swift of Android

#30
post #28
post #7

I have been fiddling with Kotlin for last few days. It is trivial to get it working in Android Studio, which is a plus already. It's not nearly as verbose as Java, and for one thing, it gives me LINQ that I've been missing from C#.

How well does the bytecode convert with RoboVM?

Kotlin works very well with robovm. In fact, there is a game written in kotlin on the iOS store called True Fool that uses robovm
Post reply on HN