Live data from Hacker News

Kotlin is now Google’s preferred language for Android app development

techcrunch.com

81–90 of 99 posts

Re: Kotlin is now Google’s preferred language for Android app development

#81

Earlier quoted context omitted.

If Oracle was really intent on poisoning Java then they would've stopped investing in it and fired all of the core engineers. But they didn't. And have in fact continued to invest in the ecosystem e.g. GraalVM, OpenJDK.

'Poisoning' is not 'getting rid of'. 'Poisoning' is taking full control and monetizing everything, making everything closed source. GraalVM is in their eyes, going to be a money-making investment. The only extent to which it might be partly OSS is a function of how much they really had to give away. Oracle's objective with Java is to take a huge bite out of the Enterprise and do with Java what they did with their DB.…

> making everything closed source.

Except the JDK is now fully open source. Even previously closed source JDK projects are now open source.

Re: Kotlin is now Google’s preferred language for Android app development

#82

Earlier quoted context omitted.

moving away from oracle is `not much gain`?

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.

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

Re: Kotlin is now Google’s preferred language for Android app development

#83

Earlier quoted context omitted.

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.

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

Sure, but the point is, you can.

Re: Kotlin is now Google’s preferred language for Android app development

#84
post #61

Earlier quoted context omitted.

This is nothing new. People were constantly introducing new languages back in the 1990s too. Of your preferred languages, Rust and Typescript are fairly new. They are among the success stories of this tower of Babel. There's a constant churn of replacing and improving languages. Nobody is using Algol, Pascal or Smalltalk anymore, and even COBOL is losing ground. (Only Lisp and C seem to survive everything.) There's a…

> Kotlin is rising in popularity because it's turning out to be the better Java that Groovy and Scala weren't. I'd say Kotlin is rising in popularity mainly because it's a Java alternative backed up by Google.

The rise-and-fall adoption of Scala and Apache Groovy is because their whole rationale for existing was to be a better something. Groovy (2003) tried to be a better Beanshell (1998) by adding closures to it. Beanshell tried to be a better Java (1995) by adding dynamic typing to it. Scala (2003) tried to be a better Java by adding definable operators to it. But when something even better comes along, their rationale for existing disappears. They will try to catch up by adding features later (e.g. Groovy 2's inferred typing to compete with Scala, or its more recent macros to compete with Clojure) but by then the newer language has made a foothold, and it's too late.

Re: Kotlin is now Google’s preferred language for Android app development

#85
post #80
post #9

...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…

Okay, let's go to 1989 and apply this mentality. Three languages to suffice all needs: * Low-level systems language: C. * Highly expressive, high-performance industrial language: C++. * Interactive interpreted language for doing easy casual things: Basic! Everybody knows Basic already. Halt the language research, stop trying to develop Python, Lua, Java, OCaml, Haskell, Smalltalk, etc. Who ever needs them? In plain w…

Good point, but Smalltalk was basically fully baked in 1980. That's why they called it Smalltalk-80.

Re: Kotlin is now Google’s preferred language for Android app development

#86
post #9

...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…

After experiencing Android development with Kotlin, I will choose Kotlin again by default. Admittedly, my experience with the most recent version of Java is not there, but Kotlin has some things I never found in Java. It statically checks for possible null pointer errors, and you can define free functions (without a class definition). Another nice thing is being able to declare constructor parameters as fields at onc…

If you ever hop back into the realm of Java, take a look at Project Lombok [1]. It adds a list of helpful annotations for those sort of features.

[1] https://projectlombok.org

Re: Kotlin is now Google’s preferred language for Android app development

#87
post #84

Earlier quoted context omitted.

> Kotlin is rising in popularity because it's turning out to be the better Java that Groovy and Scala weren't. I'd say Kotlin is rising in popularity mainly because it's a Java alternative backed up by Google.

The rise-and-fall adoption of Scala and Apache Groovy is because their whole rationale for existing was to be a better something. Groovy (2003) tried to be a better Beanshell (1998) by adding closures to it. Beanshell tried to be a better Java (1995) by adding dynamic typing to it. Scala (2003) tried to be a better Java by adding definable operators to it. But when something even better comes along, their rationale f…

I think it's not just that Groovy and Scala were temporarily a better Java that was eventually overtaken by the next even better Java, I think they were not sufficiently better. Better at some things, but with a cost not everybody wanted to pay. Groovy doesn't perform the way Java does, Scala is fast, but is a lot more complex and occasionally hard to read.

I haven't really tried Kotlin yet, but my impression is that it improves a lot on Java without any real downsides. It might not have all the improvements that Groovy and Scala offer, but it has the most important ones.

And it's a clean slate that leaves some of the poorer decisions in Java behind it.

Re: Kotlin is now Google’s preferred language for Android app development

#88

Earlier quoted context omitted.

> Kotlin is rising in popularity because it's turning out to be the better Java that Groovy and Scala weren't. I'd say Kotlin is rising in popularity mainly because it's a Java alternative backed up by Google.

I think the rebranding of Intellij IDEA as Android Studio in 2013 was a good clue of where Google's long term plans were pointed.

It's not a rebranding. IntelliJ IDEA is still IntelliJ IDEA and is still owned by Jet Brains.

Android Studio is just Google's own version of it.

Re: Kotlin is now Google’s preferred language for Android app development

#89
post #62

Earlier quoted context omitted.

Without the " tower of babel " that exists you wouldn't get Rust or TypeScript, D, Swift or Julia. Given that you mentioned them, I'm assuming you have some preference for them. So the world you'd live in would be a world in which your preferred languages wouldn't exist. I guess that would be fine for some people, but not me or people like me. So there you have your answer.

You could get all the features of Rust by just taking features from an ML-family language and adding some low level memory manipulation capabilities, plus the theoretical work on lifetimes and all. It wouldn't "look like C" but it would be the same things. You could get to any modern dynamic optionally typed language by just starting from Common Lisp, dropping the s-expressions and macros, and replacing default datat…

"There's a huuuuge bunch of intermediate steps that could've just been skipped."

Except they couldn't have just been skipped. In retrospect? Maybe. But I suspect we'll see another several thousand languages in the next 20-30 years, most of which will be very, very much like what came before, and a very few that ultimately matter. I don't think there's any way around that except in hindsight.

Re: Kotlin is now Google’s preferred language for Android app development

#90
post #87
post #84

Earlier quoted context omitted.

The rise-and-fall adoption of Scala and Apache Groovy is because their whole rationale for existing was to be a better something. Groovy (2003) tried to be a better Beanshell (1998) by adding closures to it. Beanshell tried to be a better Java (1995) by adding dynamic typing to it. Scala (2003) tried to be a better Java by adding definable operators to it. But when something even better comes along, their rationale f…

I think it's not just that Groovy and Scala were temporarily a better Java that was eventually overtaken by the next even better Java, I think they were not sufficiently better. Better at some things, but with a cost not everybody wanted to pay. Groovy doesn't perform the way Java does, Scala is fast, but is a lot more complex and occasionally hard to read. I haven't really tried Kotlin yet, but my impression is that…

> Groovy doesn't perform the way Java does, Scala is fast, but is a lot more complex

That's not quite how it seems for me. Groovy is faster than Scala in my hands (using CompileStatic) but its main challenge is complexity. It introduces a thousand quirks that have to be learned and then managed. There are some terrible legacy choices that can't be changed (eg: implicit coercion to Strings). I think this is behind the antipathy you see with people like Gradle users and Jenkins users that are incidentally exposed to it. But it applies also when you use it as a "replacement for Java". It has so many useful built in features but the price of that is all the implicit behavior of all of those need to be learned, along with actually learning Java really well, and with that along with less than perfect IDE support, and it's a steep steep curve.

Post reply on HN