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.
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…
Android now supports Kotlin
161–170 of 225 posts
Re: Android now supports Kotlin
#162Earlier 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…
thought recent android's tools update meant I can use java8 on android devices... guess that requires a recent android device :(
Re: Android now supports Kotlin
#163Earlier quoted context omitted.
Don't forget you can use Kotlin to write your build files for Gradle (since Gradle 3.0 was released almost a year ago) which Android Studio auto-completes 100% of the time (rather than 80% of the time as with Apache Groovy). Gradle 3.0 also switched to Kotlin as its "preferred" language for writing addins, so conceivably you could use the Kotlin language for everything in the Android build chain.
How would this help people who wants to use Bazel or any other build system other than Gradle?
Re: Android now supports Kotlin
#164Kotlin 1.1 supports coroutines what IHMO makes concurrency in a GUI much nicer. For example, it has C# like async/await methods; but more flexible...
Re: Android now supports Kotlin
#165http://steve-yegge.blogspot.com/2017/05/why-kotlin-is-better...
Re: Android now supports Kotlin
#166Earlier 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
The Kotlin page does a good job of explaining it if you aren't familiar. It's the single most important feature that makes Kotlin worth using over Java in my opinion: https://kotlinlang.org/docs/reference/null-safety.html
Re: Android now supports Kotlin
#167Kotlin 1.1 supports coroutines what IHMO makes concurrency in a GUI much nicer. For example, it has C# like async/await methods; but more flexible...
So what does it do better than C# 7's async/await?
Re: Android now supports Kotlin
#168Earlier quoted context omitted.
So what does it do better than C# 7's async/await?
Its more flexible and customizable, e.g. works with RxJava, CompletableFuture, JavaFX, Android... Moreover, you have more control where a coroutine is executed. https://kotlinlang.org/docs/reference/coroutines.html
Which allows full control how async/await works, kind of like on the upcoming C++ co-routines, where async/await become syntactic sugar for blessed data structure.
EDIT: Should have provided the actual information.
The feature as introduced in C# 7 is called "Generalized async return types".
Re: Android now supports Kotlin
#169I 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.
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.
Re: Android now supports Kotlin
#170Earlier quoted context omitted.
Dart runs the AdSense code, because the AdSense team rescued the Dart team when the decision came to them stop being part of Chrome development efforts. Regarding Go at Google, if you have better sources of information to share with those living outside Mountain View, it would be very helpful.
I've never heard of the story where the AdSense team rescued the Dart team. Do you have a citation for this?
Many of the important devs on the V8 team, like Gilad Bracha, were getting tired of working on the project and started to look elsewhere for a career change.
Allowing them to create their own vision what a JavaScript replacement might look like (aka Dart) motivated them to stay on the team and at Google.
When the Chrome team decided that they wouldn't be merging the Dart VM into Chrome at all and would rather focus on JavaScript, including their efforts for adding type annotations to JavaScript, the Dart team was going to be assigned new tasks.
However in the meantime the AdSense team had started using Dart and they enjoyed using it quite a lot, so a decision was made to move the Dart team away from Chrome into supporting the AdSense team as main role.
If this is not true, I would welcome any Googler that knows better, to correct me.