Earlier quoted context omitted.
Disclaimer: I am always looking for that Unicorn. The one that will let me write my code once and run it on all platforms. I refuse to give up this quest. I use Pycharm and have used other Jetbrains IDE's in the past. They make me soooo very happy to use. That is, I have tried almost every Python IDE and suped up Vim/Emacs; None of them came close to Pycharm for me. They know cross platform. Their IDE's are just as b…
Funnily enough I was also looking for this unicorn recently. I was aiming for Windows/Linux/Mac/iOS/Android. In the end the two platform that were closest at the time (summer 2016) were HTML/Javascript and C#. Or C/C++ with OpenGL for the hardcore (not me!). The real killer these days is the GUI toolkit. Ideally you'd want a SWT/Wx type wrapper around native widgets, most likely with a desktop flavor and a mobile one…
Android now supports Kotlin
211–220 of 225 posts
Re: Android now supports Kotlin
#212Earlier quoted context omitted.
The newest version of Scala (2.12) requires a JVM with Java 8 feature compatibility which makes it unusable on Android devices. Google would literally be stuck supporting an obsolete version of a language that's not developed... or restrict the use of it only to Android O and newer making it dead on arrival. Kotlin compiler generates code that's runnable on JVMs supporting Java 6, which makes it work on pretty much a…
Bit of an aside, but is the Kotlin compiler itself runnable on JVMs supporting Java 6? So you could compile on an Android device.
Re: Android now supports Kotlin
#213Earlier quoted context omitted.
I tend to agree. Sure, Kotlin is much more terse than Java. But looking at it I can't help much miss language features I've gotten used to in Rust, Haskell et al. I'm sure it's a wonderful language and an improvement over Java but there's nothing that excites me about it. Hey, at least they've got nullable types? That's a big win over Java right there.
> Hey, at least they've got nullable types? That's a big win over Java right there. Can you elaborate what you mean by nullable types? You can set Object variables to null and with primitives you can do the same with their boxed alternatives (Integer) but I assume you mean something different? Like the lack of types which can't be null? I can see how that's useful
In Kotlin/Swift by default all types do not include "bottom" or "null". You add a ? to the type to indicate you may use that value, then the compiler will validate you're checking for the existence of null before you use the type.
It's one approach... I prefer the Haskell approach with a simple Maybe/Option type.
Re: Android now supports Kotlin
#214I should note that Kotlin now supports JDK, JS, iOS, and LLVM as backends. Gradle also announced support for Kotlin. This means you can write your Android app, iOS app, web browser app, desktop app, and your build scripts -- finally all in the same language.
That's a pretty absurd claim, their native implementation is not only experimental, the GC solution is "unknown". You can't make this stuff up, it will be years before anyone is writing production IOS apps in Kotlin. Heck, their JS implementation still generates massive binaries. Targeting the JVM/Android? Sure, good to go; otherwise the promised land is a long way off.
It seems the only "beta" platform listed there is LLVM, which doesn't even work on Windows yet. The point is that we should expect these things to improve quickly. JetBrains are hardly hacks. Kotlin existed in production being used by major Android apps while significant libraries were still incompatible.
I doubt believe anyone read my comment and thought, "WOW, I should pitch this for production on every platform today without even investigating." It's a useful data point as proof of where they intend to be quite soon.
Re: Android now supports Kotlin
#215Funny, 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…
1. it gets very confused about the focus when alt-tabbing between windows (as alt, on Windows, also toggles focus on the menubar),
2. there is no attempt to solve the problem of submenus disappearing when you attempt to move the pointer towards them, which is solved in Windows and Qt with a delay, and in Mac OS and GTK with ... the solution that is actually documented in the OpenJDK wiki but not implemented: https://wiki.openjdk.java.net/display/OpenJFX/Menu+User+Expe...
So JavaFX might be high-quality in some way I haven't noticed, but to me its immediately noticeable qualities were its general slowness and brokenness.
Re: Android now supports Kotlin
#216This, along with recent Kotlin Native news, lends me to believe Google is investigating some alternative platforms for replacing their dependence on Java APIs and removing any possibility of being further hamstrung by Oracle.
Source: I've been developing Android apps for 2 years and closely follow all developments in the community.
Re: Android now supports Kotlin
#217Earlier quoted context omitted.
I think the Oracle/Google lawsuit drove the decision to adopt Kotlin. Now Google is going to work with JetBrains to develop Kotlin and is going to fork the GPL JVM probably by not including things like the controversial project Jigsaw that IBM voted down. Meanwhile, Oracle is stuck with Java, just like they're stuck with OpenOffice, Hudson, etc.
Nah. What drove the decision is that huge swaths of Android development community already adopted Kotlin and it's trivial to implement it in existing Android codebases. It's also built by a company with which Google already has partnership with (IntelliJ built both Kotlin and IDEA IDE which is the base for Android Studio).
Source: I closely follow all developments in the Android ecosystem, and have been doing so for over 2 years.
Re: Android now supports Kotlin
#218I've avoided writing React Native modules in Swift because I don't want to add the Swift runtime. It would make my app a lot bigger, and while I love Swift, I'm fine writing a few lines of code in ObjC. Will Kotlin add any extra data to an Android app? Does it have it's own runtime, or does it just compile down to the same bytecode as Java? If the app size is equivalent to Java, then this is amazing. I love Kotlin, a…
Rewriting React Native with Kotlin would make a lot of sense. Kotlin compiles to Java bytecode, so you don't need to deal with JavaScript engines, serialization/deserialization, etc. Kotlin will compile to machine code, so it'll be supported with iOS with the same advantages. Kotlin performance is better than JavaScript. Kotlin has async constructions, etc. Kotlin could be compiled to JavaScript for web apps, so code…
I don't think the GP meant replacing JS with Kotlin, rather they're referring to implementing React Native modules in Kotlin instead of Java, keeping the JS part untouched. (As you may know, React Native modules/components require native implementations before they can be used in JS).
I hope that clears things up a bit!
Re: Android now supports Kotlin
#219Would be lovely if they officially supported Clojure too.
Kotlin on the other hand has a tiny runtime (< 1 MB before dead-code elimination etc with Proguard) and negligible startup cost - in fact several popular Android libraries have a bigger startup cost impact than Kotlin.