5 ms·
I like kotlin a lot, but suddenly there are a lot of articles in the front page about it. Kotlin isn't more cool because Google announced yesterday it is going
by jorgemf 9y ago
I like kotlin a lot, but suddenly there are a lot of articles in the front page about it. Kotlin isn't more cool because Google announced yesterday it is going to use it in Android. Kotlin is the same good language it was 2 days ago! (rant over)
If you want to learn kotlin go to the official docs and tutorial, they are as good as the language:
http://kotlinlang.org/docs/reference/ http://kotlinlang.org/docs/reference/
And you don't need to install anything as you can try it in the browser:
https://try.kotlinlang.org https://try.kotlinlang.org
- hn_throwaway_99 9y agoOfficial support still matters. There is some inherent risk whenever you go in a direction not explicitly supported by the owner of your platform, and now that risk is gone.
- jjoonathan 9y agoNot only does official support matter, it matters much more than whether or not the language is good. I keep learning that lesson again and again in the hard, painful way.
- jorgemf 9y agoOut of curiosity, What was your bad experiences?
- TJ-14 9y agoAs a new developer I'd like to hear more about why this is?
- smitherfield 9y agoIf a language or tool is officially supported, then that means the project maintainers (Google, in this case) promise to support its use with official documentation, priority bug fixes (for example, if an Android update breaks your app which is written in Kotlin and uses only public, non-deprecated APIs, Google will consider it just as high-priority a bug as if it were written in Java), and first-class access to new APIs as soon as they're created.
- jorgemf 9y agoJetBrains is doing this, not Google. Google is only going to collaborate with JetBrains to help with the Android support. > Android update breaks your app which is written in Kotlin then it also breaks the same app written in java. Because the good thing about kotlin is that it is transparent, it generates bytecode as java does. So from the point of view of the platform there is no difference between kotlin and java. > first-class access to new APIs as soon as they're created. This makes me think you don't know how kotlin works. You can mix java and kotlin files in the same app and call methods from one to the other without problems.
- smitherfield 9y ago> JetBrains is doing this, not Google. Google is only going to collaborate with JetBrains to help with the Android support. Jetbrains isn't doing anything differently with Kotlin from what they've been doing for the past 7 years. The headline here is "Google officially supports Kotlin on Android," and that is what has HN so excited. Regardless of how the work involved in supporting Kotlin on Android is split, this represents a guarantee that did not exist before. If all Jetbrains employees were abducted by aliens tomorrow, Google will now still have committed to first-class support of Kotlin through the next couple of major versions of Android. > then it also breaks the same app written in java. Because the good thing about kotlin is that it is transparent, it generates bytecode as java does. So from the point of view of the platform there is no difference between kotlin and java. They share the same compilation target, not the same semantics and idioms. Just because Go, Haskell, C and LuaJIT all target x86 assembly does not mean a Linux kernel update won't break a properly-written program in one of those languages but not the others. This in fact happens all the time. > This makes me think you don't know how kotlin works. You can mix java and kotlin files in the same app and call methods from one to the other without problems. I was answering their question generically. But first-class official support means that, for example, if Google adds a new feature to the [Java] Android Runtime, they will, where relevant, now ensure it's implemented in the official Android Kotlin compiler as well as the Java compiler.
- jorgemf 9y ago
- jorgemf 9y agoYou can use kotlin for more things than just Android. And before it had official support from JetBrains (for Android among others). The way it works in Android doesn't make any difference with other popular libraries as retrolambda, picasso, dagger, etc. Those aren't supported by Google and still used in a lot of Android apps. Google only said they are going to collaborate more with JetBrains, which in my mind it translates in "we, developers, are not going to have incompatibility issues between kotlin and beta versions of the gradle plugin". (I want to highlight the word beta, because with stable versions it was weird you have any issue with kotlin).
- prlambert 9y agoThe language itself isn't 'more cool' or better, but the risk profile of adopting it has dropped dramatically. That makes it much more interesting.
- jorgemf 9y agoThere weren't any risk before apart form the kotlin plugin not working with beta versions of the gradle build plugin. Using kotlin in Android is like using a library, and you don't have official support from Google for all popular libraries used in Android.
- ajmurmann 9y agoThe risk was that you might end up with a code base that you cannot find developers that will work on it/maintain it in the future. The Android support should pretty much guarantee that there will be enough developers familiar with it in the future.
- jorgemf 9y agoIf you are an Android developer you should be aware of kotlin long time and and also tried and use it. Good Android developer knew kotlin before, now you will face more noise to find them. It is like hiring something who doesn't know the most used libraries in Android. And the risk is exactly the same. The language is not difficult to learn, not much more than a mid-complex library.
- lghh 9y agoBut Kotlin was farrrrrrrrrr from a "most used library". The risk of an unsupported language being used is much, much greater than using an unsupported library. Libraries are non-trivial to remove from your code, but should not be tied to your code to the point that you will be required to completely rewrite your application like you would if you ran into issues with the language it's written in.
- city41 9y agoI don't think people are saying it's more cool, but the announcement sure made it more known. I'd never heard of it before the announcement (I don't do anything with the JVM these days, so I'm not up on it).
- copperx 9y agoIt IS cooler, because everything that Google touches becomes gold, according to HN.
- devopsproject 9y agogoogle gets a ton of criticism here