5 ms·
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 t
by pavlov 12y ago
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.
- mike_hearn 12y agoIt's not only about Android. Kotlin is one of the few languages that's developed hand in hand with IDE support. That means you've got Java-class IDEA support for the language, including (interestingly) a Java to Kotlin converter tool! It's not like many languages where you end up having to sacrifice all your nice refactoring tools and libraries to use it. For this reason alone Kotlin is a natural upgrade path for many Java shops.
- frowaway001 12y agoHow is the Eclipse support coming along?
- V-2 12y agoBy the way, this converter is not without flaws. Eg. if you convert an Activity written in Java to Kotlin, method signatures do not match (because in Kotlin it should be Bundle? instead of Bundle and so on, since they are all nullable), and that results in baffling error messages that you're trying to override non-existent methods, it's not easy to figure out what's wrong.
- mike_hearn 12y agoLike much of Kotlin, it's sort of rough. I would not want to recommend it to anyone for an industrial project today, it's just not 1.0 material. For example the Kotlin API (extensions to Java classes mostly) is hardly documented at all.
- hhariri 12y agoMinor correction. We don't make Android Studio. Android Studio is based off of the IntelliJ IDEA platform, which is what we develop.
- deleted 12y ago[deleted]
- pavlov 12y agoOh, thanks for the correction. I had assumed that JetBrain develops Android Studio and Google just puts their stamp on it.
- IshKebab 12y agoWell that pretty much is what happens. JetBrains wrote IDEA and the Android support for it. Google made some small modifications (some good, some detrimental), and packaged it with the Android SDK. The biggest change was to switch to gradle which is a more powerful build system but also much buggier (at least in the current Android Studio). They also lots of useful Android-related tools and lints, and a fair helping of UI bugs. Still, beats Eclipse by a country mile.
- johnhenry 12y agoCould you elaborate on the detrimental modifications?
- pjmlp 12y agoOnly when it offers better support than CDT for the NDK and all those Grandle bugs get properly fixed.
- reitanqild 12y agoMeta: Anybody knows why IshKebab was downvoted?
- higherpurpose 12y agoIt's Google the one that added all of those nifty Android-specific features, like seeing how your app looks on multiple resolutions/screen sizes at once.
- oinksoft 12y agoThat'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.
- zak_mc_kracken 12y agoSince it's not 1.0, one could argue it's not even the official Android IDE yet.
- V-2 12y agoOfficial or not, it's used for production code wherever I go
- zak_mc_kracken 12y agoGoogle will probably not be sanctioning a replacement for Java on Android for quite a while, which doesn't prevent Kotlin from being a very, very good second language for the platform. One of the main advantages of Kotlin over Scala on Android is that Kotlin is a small increment over Java with very little jar size and language overhead.
- bad_user 12y agoIf Kotlin is a small improvement over Java, then the benefits of picking it over Java are outweighed by the advantages of picking Java, by the simple fact that Java is probably the most popular language in the world and as a consequence it is being taught in schools, it has extremely good IDE support, it is very stable, the whole of Android's documentation is written for it (so you can just copy/paste stuff) and so on. Personally I do not care about how writing the actual code makes me feel or whatever, what I care about is how well the final artifact works versus the effort I've put in making it work. The act of learning and using a new language is completely useless if the new language doesn't make possible and/or comfortable new abstractions that help me in managing complexity (that would be otherwise not possible or very painful in Java). Therefore personally I'll take languages like Scala or Clojure any day, because in spite of the learning experience being painful, at least I got something out of it. N.B. - I don't really know Kotlin, I only played with it and I don't have an opinion on it yet - might turn out to be a good language for me, but I hope this will not be the reason promoted for using it, because it's a very poor reason. Granted, it could be popular, just like CoffeeScript, but then again, I also hate CoffeeScript. On the small JAR size - granted that's useful, but Android apps tend to be compressed for distribution by means Proguard and Pack2000, which does tree-shaking, not perfect but theoretically you pay for what you use and in practice it works very well, not being worse than the result of importing dependencies in your project like from Apache Commons or Google's Guava or whatever and paying a couple hundred KBs for it - which counts, but nothing tragic.
- bad_user 12y agoDoesn't make sense to replace Java with another JVM language. If you're thinking about the problems they've had with Oracle, then it's not Java the language that's causing problems, but rather Java's standard library and their VM that's meant to be not-quite-a-JVM-but-close-enough. As a standard, a common denominator, Java the language is a good choice because it is popular. Other languages running on top of the JVM can be used on top of Android as well, mostly anyway, at least if you refrain from generating and interpreting bytecode at runtime.
- seunosewa 12y agoThe JVM is the best thing about Java. It's really good at optimizing statically typed code. The problem is the language and culture of verbosity that it spawned. Alternate languages are great but may not go far without Oracle's support; Oracle would rather add features to Java than seriously support other languages since they have so much code written in Java already and control it. And the new features added to Java will clash with features added to the other languages when Java was more primitive.