Live data from Hacker News

Android now supports Kotlin

venturebeat.com

111–120 of 225 posts

Re: Android now supports Kotlin

#112
post #5

Well this looks like going to push Kotlin in big league. I remember scala enthusiasts made big noise in last few years to have scala as officially supported language. But Google seems to prefer a closer relationship with Jetbrains.

It's kind of hard to get developers to adopt Scala for Android, when people in charge are diametrically opposed to even acknowledge its existence. :-)

Re: Android now supports Kotlin

#113
post #13

Earlier quoted context omitted.

Why haven't they supported Go on android?

Because to support a language you need 2 things: 1) interoperability between existing ecosystem and APIs 2) development environment support. In case of Kotlin Google had to do nothing: Kotlin is 100% interoperable with existing Java code and libraries, including Android APIs; as for the development environment, JetBrains (the company behind Intellij IDEA and Kotlin itself) provides the same level of development exper…

Jetbrains also have Gogland in preview, which is a top notch Go IDE. The bindings point is more likely to be the reason?

Re: Android now supports Kotlin

#114

This is pretty big. I really like Kotlin, but when I tried to integrate it into my app, it just didn't play well with popular libraries which rely on compile time code generation (Google's Dagger fork, Icepick, Parcels, etc). Has support for this improved / is it easy to integrate?

We use Dagger2 extensively with Kotlin where I work and it works very well. I haven't used the other libraries you mentioned.

Re: Android now supports Kotlin

#115
Anyone know of good online tutorials for Kotlin? I learned Swift for iOS development and customers have been asking for an Android version of my app. Sounds like Kotlin would be a good second language to learn.

Re: Android now supports Kotlin

#116
post #58
post #22

Earlier quoted context omitted.

Scala never worked that well, for example it requires several steps, focus on sbt, requires the pure InteliJ version instead of Android Studio, thus forcing developers to be a few versions behind on Android plugins. http://scala-on-android.taig.io/sources/

IIRC Scala also has a decidedly non-trivial runtime library with its own set of abstractions, where Kotlin is basically "better syntax" on top the existing JDK/Android library ecosystem. Writing Scala to deal with an existing Java framework "feels like" working with an FFI, where in Kotlin it's more natural.

Because of that non-trivial runtime when I used it, it also required pro-guard. I like proguard but it comes with its own set of issues. I typically set it up at some point in a project, but I don't want it required as a first step on a new project.

Re: Android now supports Kotlin

#117

What does it mean being "supported", given that one already can use Kotlin on Android?

Kotlin has been supporting Android for a while, with the promise that the language takes Android's needs into account. For example to do not request JVM 8 as a minimum...

Kotlin has been unofficially supported already by the Android tools team for some time. Meaning that they would work with the kotlin team in order to make sure that when a tools update breaks the kotlin build tools, they can be fixed in a timely manner.

Now that it is officially supported, we might have : - idiomatic android api for kotlin (there is already 100% interop, but sometimes java's code can be better expressed in kotlin) - official android documentation in kotlin. - I guess that kotlin will focus even more on Android's support

It is not going to change anything regarding kotlin compatibility with Android. Since kotlin outputs bytecode, it would be almost impossible for Android to permanently break kotlin compatibility without also breaking 99% of all Android's libs.

Re: Android now supports Kotlin

#118
hey maybe this means we will eventually be able to build apps in other languages to that target the JVM like Jython (or pure python would be cool).

Eh, I'm moving on from Python so if they never threw the ability to build apps for android with python that'd be fine, too.

Am I the only one that finds Java's (and Java 8's) syntax fine. I like the traditional type annotations and perceived verbosity.

Re: Android now supports Kotlin

#119
post #2

Funny, I was messing around with Kotlin for the first time last night. So far, the language seems well-structured and I really like that one gets all of Java's ecosystem without actually having to write java. (Also, "override fun" just sounds hilarious. Bwaha!) Throw in TornadoFX and Gluon Scene Builder (formerly of Oracle) and you're spinning up high-quality cross-platform GUIs faster than Atom, with a visual editor…

New to Kotlin + ecosystem... So can you build Android UI's with Scene Builder? I see notes about it working with Gluon Mobile which appears to be a cross platform mobile library.

Not really. Android has its own graphical stack.

You might be able to write an ndk app targeting android with you own stack of widget, but that's very different from an 'sdk' app.

Re: Android now supports Kotlin

#120
post #115

Anyone know of good online tutorials for Kotlin? I learned Swift for iOS development and customers have been asking for an Android version of my app. Sounds like Kotlin would be a good second language to learn.

The official docs has the best tutorials I have ever seen for a new language.

1 - skim the language documentation (depending on your familiarity with java, this will be more or less easy)

2 - download intellij, clone the kotlin koans repo and do these exercices.

After finishing the koans, you will have a good grasp at kotlin's basics.

Post reply on HN