Android Now Supports the Kotlin Programming Language (venturebeat.com) 91
In addition to Java and C++, Google announced at its I/O 2017 conference today that Android is gaining official support for the Kotlin programming language. VentureBeat reports: Kotlin is developed by JetBrains, the same people who created IntelliJ. Google describes Kotlin, which is an open sourced project under the Apache 2.0 license, as "a brilliantly designed, mature language that we believe will make Android development faster and more fun." The company notes that some have already adopted the programming language for their production apps, including Expedia, Flipboard, Pinterest, and Square. There are already many enthusiastic Kotlin developers for Android, and the company says it is simply listening to what the community wants. But Google's choice didn't just come down to the team believing Kotlin will make writing Android apps easier. Developers will be happy to know that Kotlin's compiler emits Java byte-code. Kotlin can call Java, and Java can call Kotlin. Indeed, "the effortless interoperation between the two languages" was a large part of Kotlin's appeal to the Android team. This means you can add as little or as much Kotlin into your existing codebase as you want, mixing the two languages freely within the same project. Calling out to Kotlin code from Java code should just work, while calling to Java code requires some automatically applied translation conventions.
Obligatory (Score:2, Insightful)
New week, new language-of-the-week.
Fucking millennials can't use languages that have worked for decades because "it's old".
Idiots.
Re: (Score:3, Insightful)
Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.
Re:Obligatory (Score:5, Insightful)
Also, their claim to be "listening to what the community wants" is bullcrap. What people want is a language that can run on Android, iOS, and desktop. Currently, the only language that can do that is Javascript, which sucks.
There's this company you may have heard of called Microsoft. It's got this program called Visual Studio that you can use to write programs in a language called C#. It has this crazy feature where you can write one version of code and deploy it on iOS, Android, and Windows. Maybe you should check it out someday?
Re: (Score:3)
He said "desktop", not "Windows".
Give me something that can target Android, iOS, Windows, macOS and Linux.
Re: (Score:2)
Oh, and it has to run in the browser. And in a kernel-free vmware deployment. Also, it has to make toast.
What you want, what we all want, is a suite of languages, each with their own strengths, which work together seamlessly.
Re: (Score:2)
What you want, what we all want, is a suite of languages, each with their own strengths
I am ok with one language for apps, another for quick scripting, and maybe another for 8 bit embedded microcontrollers.
I am NOT ok with one language for Android apps, another for iOS apps, another for Windows, and yet another for the Linux desktop. That makes no sense. All of these require the same strengths.
All Google is doing here is giving us yet another one-platform language. So now Apple has Swift and Google has Kotlin. I won't be using either, and neither should you.
Re: (Score:2)
I am NOT ok with one language for Android apps, another for iOS apps, another for Windows, and yet another for the Linux desktop.
I agree.
Having said that the idioms between in those UI environments are so different that in you need different UI layers on all of them. Anything less is a discourtesy to the users. (Remember Kai Krause interfaces? Yeah, that.) If you could write a small layer of Swift/Obj-C just to handle that in OS X/iOS, C# just to handle that in Windows, etc etc, there wouldn't be so much of an issue.
And in practice, most "apps" are so trivial that the UI is basically the whole problem.
Re: Obligatory (Score:1)
Xamarin deploys to the Mac and I believe Linux support is on the way. It really is a good cross platform option.
Re: (Score:2)
Yes, dotnet can indeed do all those things.
MS bought the Xamarin stack to enable mobile development (Android and iOS) in C#. And of course dotNet core runs on Linux, OS X, and Windows.
Re: (Score:2)
C# can deploy to Windows and Windows Phone (kinda obviously) It also can target OS X, Linux, iOS, and Android, as well as less popular choices like Tizen and Fire OS. It can also compile down to HTML5/JS/WebGL. Gaming wise, as an MS product, it can support XBox 360 or XBox One, but it can also support Playstation 3, Playstation 4, Wii, Wii U and Nintendo Switch. And, there are a handful of of other platforms supported.
Re: (Score:2)
Re: (Score:2)
Shame it's not also on Linux
The stated dev reason was
It also means that if we advertise "Linux" we would need to QA a dozen different combination due to different Linux distributions and different editions of each distribution.
But .NET Core 2.0 " treats Linux as a single operating system, much like it does with Windows and macOS. We've tested the new .NET Core 2.0 Linux builds on many Linux distributions and it works. [microsoft.com]"
So maybe there is some hope.
Re: (Score:1)
Re: (Score:2)
Xamarin? I've actually tried it, and it's kind of bad. Sure, it works in principle, but it's a bit buggy and slow.
Re: (Score:2)
Xamarin lets you cross-compile when needed, but you cannot link or directly call Xamarin libraries from Java or Objective-C applications.
That's a show stopper for us, because it means that your C# lives entirely in its own universe, without being able to interact properly with other libraries and services.
In my experience, locking yourself into Xamarin works out great for small applications. In the same way that Dreamweaver worked great to design simple web pages. It's fast and brilliant, and it doesn't req
Re: (Score:1)
I've used Xamarin, and I wouldn't wish it on anybody. When I get stuck it's with the transpiling (or whatever they call it) - the code mysteriously breaks with a cryptic error message and I'm stuck until I can get Xamarin support to help me. I use multiple programming languages on a daily basis, and having to work with C# converting to Objective C behind the covers is easily the most painful project I'm on.
Re: (Score:2)
It has this crazy feature where you can write one version of code and deploy it on iOS, Android, and Windows.
That sounds pretty cool, but how portable is it really? It is easy to make a "Hello World" program portable, but what about portable access to UI features like the camera or accelerometer? Can I detect orientation and tilt in a portable way?
Re: (Score:2)
Well, there is Java, of course, which is undeniably mature and well supported by industry - and which runs on an astonishing number of platforms. And, you know, some of us are not into Windows and can't run Venereal Studio; but we can all run things like Eclipse, NetBeans and Android Studio.
Re: (Score:1)
Re: (Score:1)
Xamarin / C# is also a very good choice depending on your needs. It will deploy to iOS, Android, Windows UWP and I believe Tizen. I'm sure the Kotlin devs will claim they are tons more productive using it than writing Java while happily having another entire team to do iOS development instead of looking at some of the other tooling options....
Re: (Score:2)
What the Android community wants is, indeed, a better Java. The rest of the software world knows that this probably isn't a good idea, but the Android community wants that.
Kotlin also targets JS, by the way, which also makes it a better GWT. Again, this is not what most of the software world wants, but it's exactly what people who use the Google Platform want.
Re: (Score:2)
Re: (Score:3)
Keep in mind, at one point C, C++, Java, Javascript, D, whatever were hot new languages.
Re: (Score:2)
Uh... no. C++ was never hot when it was a new language.
Re: Obligatory (Score:2)
Re: (Score:1)
Well, why spend time doing something productive when you can keep changing your programming language every month/week, and complain about how old and stupid everyone else is for not using the latest fads. For everything, even if it only really doesn't scale, is silly for quick prototyping, or whatever.
Software as a career is great in your 20's when all you want to do is tell everyone how great your new programming language is, and how much they suck for not loving it. Dozen(s) of fads later, I mainly just w
Never heard of it. (Score:1)
NEXT!
Re:Never heard of it. (Score:5, Funny)
Re: (Score:2)
There is a reason that many iOS/Objective C classes start with NS.....
Re: (Score:2)
There is a reason that many iOS/Objective C classes start with NS.....
They also call it Mac OS these days. That's a different animal than the version of NEXT OS it derived from.
Isn't this Ruby?! (Score:2)
Re: (Score:2)
There are a few differences:
1. It's statically typed.
2. It compiles to JVM and JavaScript.
3. It's nothing at all like Ruby, except to the extent that Ruby borrows from the same languages that Kotlin borrows from.
Re: (Score:1)
There are a few differences:
1. It's statically typed.
2. It compiles to JVM and JavaScript.
3. It's nothing at all like Ruby, except to the extent that Ruby borrows from the same languages that Kotlin borrows from.
It's
A) Curly braces
B) OO boilerplate
So I throw it in the same basket with C++, C#, Java etc.
It also isn't a real language because it compiles to a JVM rather than machine code. So it's less useful than C.
Re: Isn't this Ruby?! (Score:2)
Re: (Score:2)
>One can create a C compiler that outputs bytecode
You could but if you chose to not bother, you would get a faster executable that doesn't need a boatload software bloat to even run.
>Your comment represents a general lack of understanding of languages and their implementations, and a false belief that the two are tightly coupled.
No. It represents disillusionment at there still being nothing much new after 30 years of hardware and software development.
Re: (Score:2)
You could but if you chose to not bother, you would get a faster executable that doesn't need a boatload software bloat to even run.
I still remember the day when Microsoft C Compiler had an option to compile to bytecode. In the days of 16-bit, it made a certain amount of sense because memory was tight and the code density was so much better.
Re: (Score:2)
You could but if you chose to not bother, you would get a faster executable that doesn't need a boatload software bloat to even run.
I still remember the day when Microsoft C Compiler had an option to compile to bytecode. In the days of 16-bit, it made a certain amount of sense because memory was tight and the code density was so much better.
The apple ][ came with a bytecode called Sweet16 that let you do 16 bit code on an 8 bit CPU and yielded better code density. But requiring a browser or JVM seems to require a large amount of code bloat.
Re: (Score:2)
Not to mention the BASIC interpreter.
Most modern applications manage to be bloated even without an interpreter. All that spyware doesn't write itself. The bigger problem is battery life.
Re: (Score:2)
I assumed TechyImmigrant was joking with the 'real language' thing. Could be wrong.
Re: (Score:2)
It's
A) Curly braces
For some reason, the programming world has convinced itself that "C-like" means "curly braces".
B) OO boilerplate
Again, for some reason, the programming world has convinced itself that "OO" means "Simula".
Programmers really don't understand programming languages.
Re: (Score:2)
It's
A) Curly braces
For some reason, the programming world has convinced itself that "C-like" means "curly braces".
B) OO boilerplate
Again, for some reason, the programming world has convinced itself that "OO" means "Simula".
Programmers really don't understand programming languages.
Some programmers don't respond well to subtlety in humor, even when it's not very subtle at all.
I'm not a programmer. I have programmed, but these days, I make computers do my bidding by force of will.
Like Perl... (Score:2)
Re: (Score:2)
That would explain why you're spending so much time here, you're waiting for your shitty PyCharm IDE to run a script that takes hours, amirite?
Nope. It takes nearly 28 minutes to process 596 pages and 8,929 comments. I haven't done any speed optimizations yet, as I'm still writing unit tests, refactoring code and writing documentation. The biggest delay in program execution is probably the latency to request each page.
Re: (Score:2)
LOL - 3 seconds per page! With speeds like that, you're bound to get an offer as a top architect at Google soon, creimer.
I picked up Python when I was working at Google ten years ago. If I ever worked at Google again, I'll probably have to pick up Go.
Because performance isn't built in from the start?
Performance isn't an issue at this stage.
You should be writing unit tests throughout your coding - it's not something you do "at the end."
I'm refactoring one large class with 30 methods into a handful of smaller classes. The new classes require new unit tests. Since the program works, I'm writing documentation for the program and the unit tests.
And that refactoring doesn't include performance improvements?
That's not the focus at this stage.
Because it's more important to write documentation that'll never be read than it is to get your software working.
Program does work (see output from my previous comment). Since type-checking isn't Pythonic, I'll
Re: (Score:2)
Furthermore, why is your function not checking its inputs, and failing with a useful exception if the user specifies a string when an int (or other Numeric) is expected?
Input checking is the Java approach. Python uses duck typing (if it walks like a duck, quacks like a duck, looks like a duck, it must be a duck). If I check 0 as int and '0' as str, what about [0] as list or (0) as tuple? I would have to check for all four valid expressions. Or just let Python throw a ValueException error (quack, quack).
That's not "solving the problem" - that's simply shoveling more hardware at the performance bottleneck that you're too dumb to design around.
The program runs fine AS IS. I have yet to determine that there is a performance bottleneck. The requestor object is the most likely candidate as latency is an external vari
Re: (Score:2)
What bothers me is that you refuse to just shut the fuck up and listen when somebody who knows more than you do about a subject - obviously, and by your own admission as someone 'learning python' - offers you some useful advice on how you should approach your problem.
All you did was belittle my ability to code without actually looking my code. That's not helpful. So stop patting yourself on the back.
I can tell you where your bottleneck is: it's the part of your "brain" that refuses to close your ignorant fucking mouth for a second and absorb honest critical feedback without getting defensive and whining about how hard you've had it, and how successful you are in spite of all your problems;
You didn't offer any "honest critical feedback" to my code, as you have obviously never seen my code. All you did was talk shit.
The part that expects us to congratulate you for being a scarcely-competent helpdesk monkey with pretensions to programming competence.
BINGO! Here's the real problem. This is the whole point of all your comments. Take your negativity and stick it up your ass.
Re: (Score:2)
Stop posting on Slashdot about it.
I'm going to do better than that. I'm planning to publish my code on GitHub and submit the project as an article on Slashdot.
Kotlin is like Swift (Score:1, Interesting)
I've been using Kotlin for Android development for a while now. It's not a passing fad, and it may one day overtake Java in many things. It's just Java with additional desperately needed features.
I've heard no one whine about Swift being the flavor of the week, and yet, if you compare the languages, they are almost the same language with some slight syntactic differences. Both have null-safe typing. Both have lambdas quickly accessible. Both have extension functions. Both have interfaces that can contain de
Re:Kotlin is like Swift (Score:5, Informative)
I assumed you just meant it was "like" Swift in having similar features. But I started looking at some examples, and it's way beyond that. It practically IS Swift! I found a page comparing the two [nilhcem.com]. Aside from some minor syntax differences, you could practically swap one for the other.
Bad examples not encouraging (Score:2, Interesting)
So I click the first link "concise" and it shows me how to make a singleton. I thought singletons have basically been declared to be an anti-pattern. They're basically a name for an obfusticated global and make testing difficult.
Not very inspiring to see a bad example as the first introduction to the language. It doesn't give much confidence that the team making the language actually gets bets practices.
Re: (Score:1)
Scala developer here. That functionality (including the "object" keyword) is cribbed more or less directly from Scala.
It is a complete replacement for the "static" keyword. Instead of having a class named Foo that has random functions in it that you can't actually call on an instance of Foo, you have a separate object Foo sitting next to it where all that stuff resides.
That is a huge step in the direction of less obfuscation, not more.
The bigger problem is that all of the features listed are either cribbed
Re: (Score:2)
An one of the reasons (of many) I reverted some of my applications modules written in Scala back to Java is the easy of use of the object singletons. Nearly all Scala libraries use them, making using those libraries in a shared context, for example an EAR lib directory or as app server module/plugin a nightmare. Singletons reused between different applications and the only way to maintain isolation is to ship the same library multiple times on each WAR of a EAR wilth multiple WAR.
So no, I don't like languag
Re: Bad examples not encouraging (Score:3)
Re: Bad examples not encouraging (Score:2)
Great (Score:2)
"a brilliantly designed, mature language"
I have no reason to be suspect of the first part of that statement, but "mature"? Come on.
Is it just me, or do you all find the recent move to platform-specific languages very worrying indeed? So for anything MS-like we're supposed to be C#, on xOS the new hotness is Swift, and on Android, it's Kotlin (or Go? or Java?).
What's worse is that the only really cross-platform language remains C (there's plenty of real platforms with marginal C++, iOS for instance) and even
Bloat (Score:2)
I find it ironic that the people (Android team engineers) that don't want to use Java enums on Android APIs because they add "bloat" are embracing another language that adds more overhead over plain Java (increased application size for example) than enums could add.