I’m a little late with all the stuff from Google I/O last night due to personal issues keeping me from my PC, so let’s catch up. There’s a ton of interesting stuff, but I think what OSNews readers will be interested in the most is the Android project officially adding support for Kotlin.
Today the Android team is excited to announce that we are officially adding support for the Kotlin programming language. Kotlin is a brilliantly designed, mature language that we believe will make Android development faster and more fun. It has already been adopted by several major developers – Expedia, Flipboard, Pinterest, Square, and others – for their production apps. Kotlin also plays well with the Java programming language; the effortless interoperation between the two languages has been a large part of Kotlin’s appeal.
The Kotlin plug-in is now bundled with Android Studio 3.0 and is available for immediate download. Kotlin was developed by JetBrains, the same people who created IntelliJ, so it is not surprising that the IDE support for Kotlin is outstanding.
And the announcement from the Kotlin project itself:
For Android developers, Kotlin support is a chance to use a modern and powerful language, helping solve common headaches such as runtime exceptions and source code verbosity. Kotlin is easy to get started with and can be gradually introduced into existing projects, which means that your existing skills and technology investments are preserved.
As for user-facing features in Android O, it’s definitely a more low-key affair than earlier releases, with most new features fitting neatly in the “huh, neat” category. With a massive low-level project like Treble underway, it makes sense for Android to not rock the boat too much with this year’s release. There’s Notification Dots, smarter text selection, completely redesigned emoji, and more. There’s also Android Go,
but I’m saving that for a later item.
Yet another programming language that people have to learn, and worse yet, it has curly braces They should’ve just added Python support and called it a day.
Sure, then Android apps would be really fast, not!
But they’d have beautiful indentation.
And that would be different from now… how?
Let me know when Python gets a JIT/AOT compiler as fast as ART or clang.
And no PyPy isn’t it.
Edited 2017-05-18 21:44 UTC
There is, it is called Cobra:
http://cobra-language.com
Doesn’t look like Python to me, rather a programming language that is inspired on Python syntax.
Edited 2017-05-19 08:31 UTC
Looks a little be like VB
Faster than with Java.
Python faster than Java?!
On which world?
Does anyone have any informed opinions about Kotlin, especially in comparison to other languages?
(In particular, it seems to share more than a few design decisions with Rust, but I’m no language expert.)
Here’s a comparison to Java; https://kotlinlang.org/docs/reference/comparison-to-java.html
Don’t have any links for comparison to Rust, sorry.
But I will stick with C++/Qt/QML, even with its own glitches.
Sorry I forgot, what is the name again of that worldwide successful mobile OS using Qt/C++?
What does that have to do with his preference to stick with Qt/C++/QML?
We are discussing about Android development and all operating systems that adopted Qt/C++/QML as their official development tools failed to gain market adoption.
Even worse, none of those companies has contributed their Qt/C++/QML back to Qt folks.
Yes. And what does that have to do with his preference of using Qt/C++/QML? None of those are reasons for personal preference. To put it another way you may understand, why should my personal preference for, say, The Pixies, should be affected by anyway by the fact that more people like Lady Gaga?
What I understand about Qt on mobile is it doesn’t need to be the main development environment. So you listed examples of what wasn’t successful on a platform level. That’s not the same as being an agnostic development environment in general.
And mobile developers have to pay a licence fee, so they are giving back to Qt.
You mean Tizen?
Tizen uses its own stack based on EFL libraries and is slowly migrating to .NET Core.
I do like the “when” statement. It makes more sense then “switch”.
https://kotlinlang.org/docs/reference/control-flow.html#when-express…
.
Edited 2017-05-19 21:34 UTC
Kotlin looks like better OOP Java.
Disapointed they didn’t introduced some functional JVM language
Actually this is great news for both Android and Java. Java is now such an old language and it is really showing it’s age. It was invented as a C++ replacement by those clever people at Sun Microsystems (remember them?) who knew best about how we developers should write programmes, forcing us to handle typed exceptions and we developers should always declare the correct types shouldn’t we! And we definitely should not be using pointers. But just what were they thinking about allowing those pesky nulls.
Apparently there was an AH HA ha moment at Sun when thinking of a new feature they really needed in Java, only to be told by Python programmers that they have had this for years, it is called duck typing.
The have been various attempts to fix and modernise Java. Groovy was good but too slow as it is a scripting language. And then there is Scala which is very good but maybe just too clever. Apparently you could not always follow what an advanced Scala programmer had done just by reading the code, and you often had to use a debugger just to figure out what is going on. Also Scala is a heavy language which greatly increases the size of any Android app.
However at JetBrains they took a completely different approach when designing Kotlin, they wanted a new modern lightweight language that would work perfectly with existing Java code. Allowing Java and Kotlin to be seamlessly mixed together in the same project without taking any performance hit is one of the main goals of Kotlin. This means you don’t have to wait for a new big project when switching to Kotlin, you can gradually start using it in any existing Java project.
Anyway I found this blog called “Why Kotlin is my next programming language†that explains this better than me. See https://medium.com/@octskyward/why-kotlin-is-my-next-programming-lan…
LouisBarman,
I’m glancing through Kotlin, but the difference looks mostly syntactic. Not to criticize it for that per say, but does Kotlin offer anything over Java in terms of functionality?
Language with a nicer syntax means squat when android API itself is an absolute piece of crap. Its a relic from a bygone era of xml-all-the-things and devices not really being able to run Java.