
Android’s Commitment to Kotlin - WalterSobchak
https://android-developers.googleblog.com/2019/12/androids-commitment-to-kotlin.html
======
clumsysmurf
At this point, I feel no language can compensate for the platform's out-of-
date java libraries. I think Google has its priorities wrong: first should be
recent java, second should be kotlin.

~~~
sidlls
I disagree: they should just dump the whole ecosystem. Kotlin is a shabby
bandaid, not because the language isn’t good (no comments there) but because
the substrate is a mess of bloated, terrible, OO Java nonsense. Android
development is just awful no matter the language.

~~~
batterystd
I'm seriously not astrotrufing (for once!) but isn't Android itself shitty all
round? Really complex OS that does a million things and all wrong. I have a
phone where no fb is installed but fb services that cannot be stopped are
running in the background.

I'm waiting for a Linux phone

~~~
anonuser123456
Well, if your OEM installed crapware in the system/vender/OEM partition,
that's not really Android's problem. All other apps/services are very
removable.

~~~
cle
It is the customer’s problem, so it is jointly a problem for Android and the
OEM. Google may try to abrogate responsibility here as usual, but it doesn’t
make it any less their problem.

~~~
sliken
Dunno, the answer is generally if you don't want crapware, buy a pixel.

~~~
OkGoDoIt
But the pixels are (in my opinion) just such complete misses as phones. I’m
not sure I’d want to use the latest Pixel if I got it for free, yet they
charge an absurdly high price for it. I used to love my Nexus 4, and I liked
my Nexus 5. It was absolutely amazing to have a real Google phone that I
didn’t have to fight with in order to own for real at the lowest levels. But
all the recent pixel phones have way too many trade-offs for me to use any of
them as my daily driver. There are android phones out there which I like and
would be happy to use as my daily driver, except on the software side they are
way too locked down and I can’t root/flash them. I really wish phones worked
the way computers do, I could just buy/build any hardware I want and run a
fresh copy of Linux or windows on it under my complete control.

~~~
sliken
Why a complete mess? Sure Google is a popular target, much like apple, where a
huge number of people chime in to complain. I've had every nexus and every
pixel, all the way back to the HTC G1 on the first day it was for sale.

Sure choice of OS would be nice, but there's a huge number of man hours that
go into making a nice touch UI. Something that experts don't tend to obsess
over, unless paid.

The pixel's don't have a locked bootloader, and you could try one of the
community builds, which I've done. But there's much less incentive lately. I
used to root to tether, don't need to anymore.

------
tlarkworthy
> Today, we’re proud to say nearly 60% of the top 1,000 Android apps contain
> Kotlin code

^^ This precise phrasing looks like an OKR.

~~~
edoceo
OKR = Objectives and Key Results.

I had it look it up: ""collaborative goal-setting tool used by teams and
individuals to set challenging, ambitious goals with measurable results"" \--
among other definitions and graphs.

Is this management speak about vanity metrics? What do these measurements even
mean?

~~~
harryh
The use of OKRs goes back to Andy Grove at Intel and while, like any tool,
they can be misused they're definitely not just for vanity metrics. Some more
useful OKRs might be things like:

\- Increase number of signups for our app by 10%.

\- Decrease the rate of customers churning off our platform by 20%.

\- Reduce the median time it takes to ship a product out of our warehouse from
3 to 2 days.

------
blibble
the problem with Android is the god awful API, not Java

this says it all:
[https://cdn1.hubspot.net/hubfs/2564010/The%20activity%20and%...](https://cdn1.hubspot.net/hubfs/2564010/The%20activity%20and%20fragment%20lifecycles%20\(1\).png)

and it gets worse with every release

~~~
kumarm
How is that Bad? Any Activity you have need to have proper lifecycle.

Every UI Toolkit has something similar.

Same events for IOS:
[https://developer.apple.com/documentation/uikit/app_and_envi...](https://developer.apple.com/documentation/uikit/app_and_environment/managing_your_app_s_life_cycle)

~~~
blibble
no UI toolkit I've used has anything nearly as complicated or error prone

it was designed for phones with 4mb of memory that need to serialise their
entire state everytime a form (activity) disappears because they don't have
enough memory and google were too lazy to implement it in the OS

as a result you need to implement masses of error prone boilerplate crap for
each and every activity, and nearly everyone gets it wrong in subtle ways

rotate your screen? better implement that serialisation perfectly else the
user will lose state when they rotate their device

a lot of apps just disable features like rotation, because they're too time
consuming to implement (and a nightmare to test)

~~~
ShamelessC
I've never understood why rotating the app resets the state like this without
writing code to handle it. I mean even a lightweight website can change its
interface on rotation using only CSS without losing any state. It's been
several years since I messed with Android development. I assumed it would be
fixed by now.

~~~
izacus
Because the alternative is not resetting the state and having to deal with the
fallout. iOS does this and it's a source of even more strange bugs and side
issues (based on doing cross-platform development across several teams).

This even led to the point where a huge amount of iOS apps simply banned
rotation support to not deal with it.

It's just a different tradeoff. The underlying issue is that developers don't
want to deal with storing the state which causes issues on lower end devices,
which start to break as users multitask. The Android tools for that also
aren't all that great - although I also haven't really seen any other toolkit
do it better.

~~~
cerberusss
I'm an iOS developer and I'm not sure what you mean. Auto Layout provides
enough hooks to take care of rotation. Why would rotation be a source of
strange bugs and side issues?

~~~
izacus
Because not all the state and layout is handled by AutoLayout... and it has
its own set of bugs. Heck, iOS apps themselves (iMessage, Springboard) and
riddled with rotational layout bugs in iOS 12 and 13.

~~~
cerberusss
But how bad is it, I mean how many have you encountered so far? I don't doubt
it, but in my years of iOS development, I haven't seen them.

------
reegnz
When will we have a proper LSP implementation for Kotlin that is maintained
not by a single person but a full blown team?

JetBrains is very short-sighted about this[1], putting their own IDE-s success
over the success of Kotlin: not healthy for the language if you ask me.

A lot of developers using Kotlin are also gaslighting everyone who doesn't
want to use IntelliJ for Kotlin as if using the editor of your choosing is
some sort of madness.

Kotlin needs to be a foundation, it clearly has a big community to drive the
language and its accompanying tooling and integrations. Kotlin needs to be
completely decoupled from JetBrains to succeed outside the JVM/java legacy
areas.

[1][https://discuss.kotlinlang.org/t/any-plan-for-supporting-
lan...](https://discuss.kotlinlang.org/t/any-plan-for-supporting-language-
server-protocol/2471)

~~~
pjmlp
Java, use any IDE you feel like it without any extra tooling.

Kotlin, here have InteliJ, oh yeah there is also this 2nd class plugin for
Eclipse, and nothing else for the others.

------
pabl0rg
Kotlin is a palliative that makes android dev nearly tolerable. Flutter is way
better, even though Dart is not as good as Kotlin.

------
Dontrememberit
If Android is "Kotlin-first", why is flutter development done in Dart?

~~~
plorkyeran
Flutter is an Android competitor that happens to be made by the same company.

~~~
brabel
Flutter is for those who want to use the same code on both Android and iOS...
it's not a competitor to either, it wouldn't exist without them.

~~~
pjmlp
So Kotlin/Native then.

------
amluto
I’m a bit surprised Google hasn’t bought JetBrains. I bet they could get it
for something like $2bn, which seems like an entirely reasonable price to pay
to help improve the Android ecosystem.

On the flip side, Apple could buy JetBrains and seriously mess with Google,
although that acquisition wouldn’t really make as much strategic sense.

~~~
stock_toaster
> although that acquisition wouldn’t really make as much strategic sense

I dont know... maybe if apple bought jetbrains they could get them to rewrite
xcode for them. :/

~~~
pjmlp
They already did,
[https://www.jetbrains.com/objc/](https://www.jetbrains.com/objc/)

------
sandGorgon
All of this is flowing in from the ongoing #KotlinConf

Jetpack Compose - a react like paradigm to build apps - is the future of
android app development. And I could not be more excited.

Kotlin Multiplatform is on track
([https://twitter.com/zsmb13/status/1202507590674112513](https://twitter.com/zsmb13/status/1202507590674112513))
and will let ios apps be built using android studio without a Mac.

Kotlin 1.4 is touting upto 3x compiler improvements.

The question here is about the future of Flutter. Why do Flutter/Dart when
Android is officially throwing its weight behind Kotlin and Compose is going
to be every bit as react-y as Flutter or SwiftUI.

~~~
pjmlp
Same applies to why ChromeOS when Android? Politics.

Management is throwing money at them and watching who brings the best numbers
back home, kind of thing.

Although like ChromeOS was forced to eventually support Android, I imagine
that Flutter will eventually loose the battle.

Betting on Dart was never a clever option to start with, and now with
Xamarin/WinUI, JetPack Compose and SwiftUI all demoing Flutter like
experiences, it is clear that the reasoning for Dart being a special case
isn't really the case.

------
efxzsh
I read Jetpack Compose will be able to support multiplatform as well. It will
be a kind of flutter possible with Kotlin.

Well, it’s no surprise that google can run multiple projects that solves more
or less the same thing.

------
FpUser
I hold no grudge against Kotlin as the language. But underlying platform ...
I'd rather prefer for them to switch to some native thing. It is really
depressing to compare situations when I could whip up high performance small
native GUI application and that atrocious monstrosity called Android studio
produces regurgitates fat resource hogs.

~~~
jrs95
It seems pretty likely that Flutter become the preferred stack at some point
in the future given that it's used as the primary UI toolkit for Fuschia. That
is still probably a few years away though.

~~~
izacus
This is as likely as Qt becoming a primary toolkit for Windows.

------
giorgioz
Truth is Kotlin and Swift are just a form of developer lock-in. A webapp
written in React inside of a chromium webview is fast enough for most apps use
cases. (NO REACT NATIVE PLEASE) The fact that Javascript is improved by many
parties made the tooling and the performance of Chromium very fast.
Babel+Webpack are years ahead of the build systems for both Android and iOS.
Sublime and Atom are much leaner and better for coding than Android Studio and
Xcode.

~~~
kuschku
> are fast enough for most apps use cases.

If that's the case, then you don't need an app in the first place, and
shouldn't develop one.

We don't need apps for every online store and every website.

But Android is slowly limiting the power of apps further and further, until
there won't be any need for apps anymore.

The whole point of apps is to interact with hardware browsers don't support,
to interact with files and provide high-performance functionality. To speak
protocols browsers have never even considered supporting.

~~~
anoncake
The point of apps is also to deliver a decent user experience that web pages
just can't deliver.

~~~
pjmlp
PWAs and mobile web can deliver a decent user experience, if the developers
actually bother delivering it.

~~~
anoncake
No, not at all. A decent user experience requires using the native toolkit and
behaving like an actual app, not appearing in the browser. Everything else is
garbage.

------
netwanderer3
What about Dart and Flutter framework?

------
marktangotango
So if Google wins the Oracle case, does Kotlin support cease, or is there no
going back at this point?

~~~
bilal4hmed
at the rate its going there is no stopping. Kotlin is a much nice experience
that Java and far more projects are starting today with Kotlin rather than
java

~~~
pjmlp
Then they better rewrite everything in Kotlin/Native.

------
pjmlp
Android, aka Kotlin Virtual Machine.

Nowadays I keep waiting for the JetBrains acquisition news story to pop up.

------
Cloudgazer3d
The main problem with java is oracle though which lobby patent trolls its way
towards almost zero progress for java in the past 10 years. Sure they release
java 13 now but compared with the feature-set of Kotlin and swift it's rather
pathetic. Especially considering the planned price model of java 9+.

