Google Pushes Kotlin Over Java for Android Development (thenewstack.io) 117
Google "officially declared Kotlin the go-to language for Android development last week at its Google I/O developer conference," reports Mike Melanson's "This Week in Programming" column, "and the company is backing that up with a couple of initiatives around making it easier (and free) to learn the language now used by a majority of Android developers."
Google teamed up with Udacity to offer Developing Android Apps with Kotlin , a free, self-paced online course on how to build Android apps with Jetpack and Kotlin, meant for people who have programming experience and are comfortable with Kotlin basics. Google also announced "Kotlin/Everywhere, a series of community-driven events focussing on the potential of Kotlin on all platforms," which it is putting on in conjunction with JetBrains.
Of course, this leaves the question that has been asked many times before -- why Kotlin? -- and IT consultant Kristen Carter offers a take on how Android app development became Kotlin-first. Carter offers some business angles, such as the 2010 lawsuit against Google by Oracle, which predates Kotlin by just a year, and she speculates may have been the impetus behind the language's development as "Google has always wanted to get away from the [Java] ecosystem." At the same time, Carter offers some language-specific reasoning too, such as the comparably succinct nature of Kotlin, the absence of Java's NullPointerExceptions, and the ease with which Java developers could transition to Kotlin. Carter ends her piece by posing the possibility that Oracle "knows the significance of Java in android app development" and could "ship Java with a few upgrades in its next version to take on Kotlin."
Of course, this leaves the question that has been asked many times before -- why Kotlin? -- and IT consultant Kristen Carter offers a take on how Android app development became Kotlin-first. Carter offers some business angles, such as the 2010 lawsuit against Google by Oracle, which predates Kotlin by just a year, and she speculates may have been the impetus behind the language's development as "Google has always wanted to get away from the [Java] ecosystem." At the same time, Carter offers some language-specific reasoning too, such as the comparably succinct nature of Kotlin, the absence of Java's NullPointerExceptions, and the ease with which Java developers could transition to Kotlin. Carter ends her piece by posing the possibility that Oracle "knows the significance of Java in android app development" and could "ship Java with a few upgrades in its next version to take on Kotlin."
WTF is "Kotlin"? (Score:3, Insightful)
Re: (Score:1)
Re: WTF is "Kotlin"? (Score:2, Interesting)
Re: (Score:1)
Like Swift on iOS, you don't switch on intro (Score:3)
I found some code written in kotlin that looked like it might be useful and gave it a try a couple of weeks ago. Absolutely not ready for prime time and flawed in so many ways as to likely be a complete waste of effort.
As with Swift on iOS and macOS, you don't switch on introduction. You wait a couple years. Or more, judge things by how much of Google documentation and example code is in Kotlin rather than Java, and 3rd party examples too. How quickly and radically the language changes as well.
Ultimately you want to use the language that the operating system provider recommends. This will reduce your pain in the long run. But you don't want to be an early adopter here, that is asking for near term pain.
Re: (Score:2)
What do you do if the operating system provider is Google? They drop things like Helen Keller playing shortstop.
Re: (Score:2)
What do you do if the operating system provider is Google? They drop things like Helen Keller playing shortstop.
Well on second thought you should drop Android Java code and drop Android Native SDK Linux code and go to Andoid Kotlin and Android Native SDK Fuscia. ;-)
Re: (Score:2)
Kotlin is probably already ten years old, and your parent is just to stupid to grasp it. Kotline is basically just Java with a more sane syntax.
Re: (Score:2)
Kotlin's a couple years older than people seem to mistake it to be (given the responses). I'd say Kotlin started getting "hot" about two years ago. Kotlin has probably gone beyond "early adopter" stage at this point. Its older than Swift, that's for sure.
Re: (Score:2)
De-java'd backside w/ Dalvik, now front w/ Kotlin (Score:2)
By what I have read e understand, it's just a wrapper around the JVM...
The Google byte code and virtual machine are Dalvik. Basically Google had already de-java'd the backside. Now with Kotlin they are de-java'ing the frontside.
Re: (Score:1)
WTF is "Kotlin"?
Great minds think alike.
Re: WTF is "Kotlin"? (Score:2)
If only there was some kind of global network where you could search for such information
I use Kotlin (Score:4, Informative)
But it's nothing to get excited about. It's not hard to use once you get past a few surprises.
Re: (Score:2)
Please elaborate these surprises.
Re: (Score:2)
If you have functions with a single unnamed parameter the name defaults to "it".
Re: I use Kotlin (Score:2)
Except for every Java library ever. I swear I've never seen so many people talking about Kotlin who know nothing about it at all.
Re: (Score:2)
Looking it over it looked quite poor for concurrent programming.
That said, after the Oracle suits over API documentation, I can sure understand why Google didn't want to have anything to do with anything they have any handle on. And Kotlin is probably the easiest transition away from Java.
Re: (Score:2)
Looking it over it looked quite poor for concurrent programming.
You would be correct sir. Kotlin doesn't really solve anything new for Java, it's bad at concurrency. Concurrency is also a bit hard to get right in the JVM, for some definition of "right" (mine). Go is also poor for concurrent programming, but less so. Even though Go tried to be really good at concurrency, it isn't.
I'd lean more towards Erlang and Elixir if concurrency was my primary concern, especially in a distributed environment. Concurrency almost never is of primary concern in what I do, it's usually
Re: (Score:2)
The trouble with Erlang and Elixir is that they demand all data be immutable. (Well, not really. Each object can have one mutable map, and the database connections aren't immutable, but...)
I want data to pass between procedures via immutable byte strings, and no externally visible data. This is a nearly incompatible usage.
Yes, I *could* do it in C or C++, but there's so much programmer overhead that they're impossible. I'm one person, so I need to minimize doing things like writing custom routines to de
Re: (Score:2)
The trouble with Erlang and Elixir is that they demand all data be immutable.
I really appreciate this model. There is a lot you can prove statically when this constraint is in place.
I want data to pass between procedures via immutable byte strings, and no externally visible data. This is a nearly incompatible usage.
Agreed that what you want to do is essentially incompatible with the model. Passing values to functions rather than references would be what languages like these prefer.
The advantage is it permits a more general optimization for distributed processing and parallel processing. Disadvantage, it doesn't let you write the program the way you wanted to.
Yes, I *could* do it in C or C++, but there's so much programmer overhead that they're impossible. I'm one person, so I need to minimize doing things like writing custom routines to determine whether a directory already exists.
My entire career is built on writing boiler plate and one
Re: (Score:2)
Looking it over it looked quite poor for concurrent programming.
Why would this be relevant, given whether its Kotlin or Java, they have to run off of the same JVM? You really expect sophisticated concurrent support built into the front end of a JVM language? Kotlin is not going to be running on mainframes or exotic architectures; its a "working" language for Google's android environment, which are primarily ARM based phones and tablets.
Re: (Score:2)
Comment removed (Score:4, Interesting)
Re: (Score:2)
Nobody likes programming in Java, ...
I do -- but I'm a little weird.
(And I'm proficient in 10-15 programming/scripting languages, so liking Java isn't by default.)
Re: (Score:3)
Re: (Score:2)
Java 11 wtf? We are just testing 8 now and depcraited 6 a year or two ago. Jesus
Re: Combination most likely (Score:5, Insightful)
Re: Combination most likely (Score:1)
Re: (Score:2)
How can renaming a variable be any easier in Java compared to other programming languages?
Re: (Score:2)
Re: Combination most likely (Score:5, Informative)
This is just one example of a refactor that is made easier by static typing, there are a lot (of more or less usefulness). Rename variable/rename function/rename class are the most useful for me, though.
Re: (Score:2)
Think about C. By the time you've worked out whether it should be cIntPtrChrWinConstRefHnd or cPtrIntChrWinRefConstHnd you've forgotten why you wanted to rename it.
Re: (Score:2)
I'd rather hand-code binary routines for the Dec Alpha than use the Win32 API, but you know, COM had a good concept. Implementation was bad enough to make 99.9% of its users want to burn it, even after M$ built an abstraction layer on top, but the concept was ok.
BR BTW we need an acronym for Google that is as eff
Re: (Score:2)
Because strong typing makes refactoring more easy ... a simple search/replace would replace everything.
Re: (Score:3)
I like many things about Java, but not the language as it has developed. I wan unsigned variables. I want structures whose byte alignment I can control and depend one. (No, pack doesn't count.) I want uint64_t integers...which are values, not handles to something. I want to be able to store those integers in structures...call them hash tables, maps, whatever. I want reasonable enumerated values. I want global constants. Etc.
So the language that I really want is Digital Mars D version 1, with a whole
Re: (Score:2)
The javadocs make it quite clear that native variables cannot be stored in the data structs. What you can store is handles to them. The difference between "Long" and "long". And last I checked there weren't any unsigned variables. And their fake enums are horrible. And they don't handle utf-8 internally, nor do they handle UCC2 (i.e. utf-32). And... well, just try to map a byte aligned C struct onto anything in Java except a byte array/vector/string. (Yes, I *know* you can do it. You could do it on
Re: (Score:2, Insightful)
I'm a software engineer and I really really do not like Java!
It's a clunky language with an equally clunky compiler and run-time. Even the simplest programs require typing in tons of excess explicit type conversions that the compiler should have been smart enough to take care of, instead of nagging and demanding the developer to do it. The lack of pointers makes it impossible to do certain algorithms efficiently. The automatic garbage collection and JIT makes programs have uncontrollable random delays that
Re: (Score:2)
I love working in Java.
Just great (Score:5, Funny)
Google "officially declared Kotlin the go-to language for Android development ...
After all these years, now they tell us to use GOTOs ... -- geesh, make up your minds already.
Re: Just great (Score:1, Interesting)
You think this because you have no understanding of what happens under the hood. When you are a hundred thousand iterations deep in a recusrive function you *could* incur the overhead of unwrapping the stack a single return at a time ... or you could use goto and unwrap the entire stack at once. Kids today. Enough knowledge to be dangerous at best.
Re: (Score:2)
Indeed. And also to the low level of skill found in most coders today. They are still desperately searching for the One True Language that will make them good coders. Of course, that language does not and cannot exist.
Tutorials (Score:2)
Re: (Score:3)
Solution - replace android with a brand new platform that uses exclusively C++, no bloat.
Pretty strange that, when I think of C++, I think of bloat. There is nothing not in that language.
Re: Tutorials (Score:2)
What about "Go"? (Score:1)
'Google "officially declared Kotlin the go-to language for Android development last week at its Google I/O developer conference,"'
Guess I'm behind the times. I thought "Go" was Google's 'Go'-to language
Dart/Flutter is where it is at (Score:1)
Forget Kotlin, it is not worth the time. The Flutter/Dart combination is great.
Go (Score:3, Insightful)
Wait. Whatever happened to go? Wasn't that supposed to be the new Google language
Dart (Score:1)
Re: (Score:2)
Wait. Whatever happened to Dart? Wasn't that supposed to be the new Google language?
It's almost as if different languages are good for different kinds of programming and programming environments.
Re:Go (Score:4, Informative)
Neither Go nor Dart were ever intended for use on Android for app development. Dart was always intended to be used mostly within the browser (transpiling to Javascript mainly), and Go is intended to be a sort of safer systems language. I always saw Dart as more of an experimental language. Go is used internally at Google on their servers in place of C++.
Kotlin has its own momentum at this point in the Android development space, so adopting it makes quite a lot of sense.
Re: (Score:2)
Google renamed it to went.
Why? Just Why? (Score:5, Insightful)
Google seems to have this compulsion to introduce/push new languages and stacks without regard to the serious overall product lifecycle concerns that go along with them.
As a software engineer (not developer) and team lead, I care about not just the language, but the libraries, run-times and people and tools that go along with them.
Oracle's absolute IP bullshit aside, which could be solved in any number of creative ways. Kotlin means that I have to retrain my team. Revalidate my tools, compiler and software stack and possibly double my overall dependency foot print if I need any legacy Java inter-op. This also means substantially higher license compliance efforts amongst other things.
The entire thing has to be seriously compelling to justify the long-term cost. The "programmer productivity" go-to argument just doesn't hold water. Almost every software engineer is taught in school (and it holds in industry in my experience) that initial creation of the software is a small fraction of the overall cost to produce and maintain that software.
In short, I'm not buying what Google is selling. Especially after the whole Eclipse vs IntelliJ Android Studio switch over debacle.
Re: (Score:3)
Almost every software engineer is taught in school (and it holds in industry in my experience) that initial creation of the software is a small fraction of the overall cost to produce and maintain that software.
I wish more people were taught that. It seems to be something people have forgotten.
It's Dilbertian turtles all the way down (Score:2)
IT chaos is job security. A Grand Truth of the industry is that if our industry streamlined and factored everything, perhaps 2/3 of us would be unemployed. Maybe it's not a conscious decision, but our normal human subconscious biases us toward selfish goals.
"Shut up and learn rocket science" is heard much more often than, "Hmmm, maybe we over-complicated this." IT is not alone: Warren Buffett likes to rant about similar waste and BS in the financial industry. [columbia.edu]
Kotlin IS Java (Score:3)
The why is that it is NOT actually Java, for legal reasons.
But there should be no retraining of teams. It is almost identical.
The one nice thing it has is keyword named parameters. Just like Visual Basic had decades ago. Sadly, it still does not have properties.
Re: (Score:1)
Kotlin is a first class language in IntelliJ (both made by Jetbrains), the IDE that Android Studio is based on. Eclipse + the Android plug in was a nightmare, and thank goodness Google switched away from that mess. Very few people miss it because it sucked and most competent developers are able to learn a new IDE.
Kotlin has a number of benefits over Java, including being a far more modern language that still runs on JVM-compatible runtimes. Java libraries are compatible with Kotlin, but the opposite isn't n
Re: (Score:1)
Re: (Score:3)
Kotlin runs on the JVM and interoperates perfectly with Java. You can call any Java library from Kotlin and you can call any Kotlin library from Java. That means you don't need to replace your software stack, and you add very few new dependencies. You probably don't even need to replace most of your tools, because most of them probably already support Kotlin.
It's also easy to make the switch gradually. You can even mix the two languages in a single project, with some classes written in one and some in t
"Kot" means "crap" (Score:2)
Yes, I know this is probably a Swiss-German inspired naming, but in proper German, the naming is more than unfortunate. Probably adequate though.
Class extensions (Score:2)
Class extensions are nice. I haven't seen them since the Smalltalk days.