
Kotlin is now Google’s preferred language for Android app development - el_duderino
https://techcrunch.com/2019/05/07/kotlin-is-now-googles-preferred-language-for-android-app-development/
======
nnq
...great, Kotlin for Android, Dart for Flutter, on the ML side they're
starting to adopt Swift, for networking infra code Go.

What the heck is with this _" tower of babel"?!_

Are other people not bothered by the overlapping features of all these
languages? At this point I thin most would prefer a slightly-frankensteinian
monster-language that you'd get by taking either Kotlin or Swift and bolting
all the other features on top of it.

There should be an estimate about the cost of all this useless diversity that
we're all invisibly paying. Some tech/languages have really unique features,
and have a reason/right to exist, eg. Rust. But most would've been better as
extra features bolted on top another language.

Basically all programming in the world could be done with 3 languages: a
secure system language (Rust?), a dynamic but optionally typed dynamic one
(Typescript?), a full-spectrum metal-to-abstraction language with flexible
compiler/infra for things like heterogeneous (CPU+GPU+TPU+whatever) code
generation (C++? D? Swift? Julia? maybe also Rust?).

Plus the hidden cost of security issues created by people coding in languages
they are not experts in because they need to always switch...

~~~
PunksATawnyFill
Yep. Swift is open-source and pretty decent. Google should clean house and go
with the language that would attract the most developers.

~~~
AlexeyBrin
Swift doesn't work natively on Windows which is a massive downer for many
people.

~~~
inickt
It doesn't yet, but good progress has been made recently on that front:
[https://forums.swift.org/t/swift-
windows/22458](https://forums.swift.org/t/swift-windows/22458)

------
maga_2020
I feel good and bad about this.

I invested several years at coming up to speed with Java 8+ (using templates,
rx, streams, the new time APIs). It was not hard, but difficult to unlearn
some C++ idioms around templates, consts, reference model and object lifecycle
management.

Clearly this driven by Oracle's continuous poisoning of Java ecosystem (eg
[https://headcrashing.wordpress.com/2019/05/03/negotiations-f...](https://headcrashing.wordpress.com/2019/05/03/negotiations-
failed-how-oracle-killed-java-ee/) )

And I think Kotlin is a solid step forward from the Java without the baggage
of pre JDK 1.7 idioms.

But for a small (often single dev) shops trying to compete in Android
marketspace, it is quite hard to maintain this rate of change (plus
incorporating all the new (and better ways) of doing android with androidx )

~~~
EdwardDiego
Not sure what you mean by templates, but you can still use Rx, streams and
java.time.* in Kotlin. It's pretty much just a nicer Java.

~~~
vbezhenar
Kotlin has its own (much better IMO) alternative to streams: Sequence. I see
absolutely no reason to use streams in Kotlin.

~~~
elcomet
One simple reason: you already know streams and don't have time to learn
sequence.

~~~
ptx
Streams is mostly just Java's version of what many languages already had, so
the concept was something new to learn for Java developers, but once they know
it they shouldn't have much trouble with Kotlin's sequences – or with Python's
list comprehensions, Lisp's mapcar, and so on.

------
BossingAround
It seems to me that a lot of people seem to think prefering Kotlin signifies a
move away from Java. But I simply don't understand how using a JVM language
signifies a move away from Java. After all, it all gets compiled into the same
bytecode, and Kotlin heavily depends on the Java ecosystem.

If Oracle is 'poisoning Java', Kotlin's not the answer. Surely, it'd be a
language totally independent of Oracle, wouldn't it?

~~~
vitoreiji
I bet they have plans to make a different VM for Kotlin and move away from
JVM, should be coming in the next couple of years.

~~~
ForHackernews
Why bother? Being on the JVM has many advantages and building some new VM (and
compiler?) would be extra hassle and expense for not much gain.

~~~
PunchTornado
moving away from oracle is `not much gain`?

~~~
ForHackernews
There's already at least two big-name alternatives to Oracle Java: The OpenJDK
and Amazon's Corretto. If you're suggesting Google might make their own
"supported" OpenJDK build, then sure, that might be worth something. That's
different than moving away from JVM entirely to a different compiler target,
as suggested by the parent comment.

~~~
pjmlp
OpenJDK is like 90% developed by Oracle with smaller contributions from other
partners in the Java community, including the JEPs that bring Java forward.

------
eatonphil
Not sure why they don't link to a source on this. Here's what I found [0]. It
says:

> If you’re starting a new project, you should write it in Kotlin

[0] [https://android-developers.googleblog.com/2019/05/google-
io-...](https://android-developers.googleblog.com/2019/05/google-
io-2019-empowering-developers-to-build-experiences-on-Android-Play.html)

------
pjmlp
Good that they cleared that out.

Lets see what is the roadmap to use Java 9+ libraries in Android, or if they
are supposed to be all rewritten in Kotlin.

Secondly, will they also replace NDK with Kotlin/Native? Given that several
APIs are NDK only, and naturally should be accessible to the prefered language
as well, without manual boilerplate.

~~~
benjymo
I don't think they should be rewritten in Kotlin. That would force everyone to
use Kotlin with minimal benefits for Kotlin users.

~~~
liopleurodon
Might have less to do with users and more to do with Oracle v Google

~~~
pjmlp
I am fine with Google having their own ".NET", at least it isn't Google J++
anylonger.

------
stunt
I thought it was already Google's preferred language. I remember they
announced that some time ago.

------
_Codemonkeyism
Love the JetBrains people, thanks for all their work and putting their IDE
language knowledge into a programming language - that's also I assume easy to
parse and support in an IDE.

------
fithisux
So, now we should all start using Kotlin because Google uses it. Great! (Pun
intended of course).

