News for hackers. Stuff that matters.
Re:Kotlin is the hero Android needs by StevePerkins on Friday May 19, 2017 @07:36AM (#14374604)
1. Android is the largest mobile platform on the planet.

2. It's been around for a decade now, but has only supported development with Java and C++.

3. The most recent version of Java supported comes from 2011. And full C++ support is only recent.

4. Few people (if any) really like these options.

5. This week Google announced that Kotlin is the next "official" language with first-class support.

6. A temporary wave of stories appear on HN.

Are you new here? I'm sure that next week it'll go back to the usual threads about Rust or Haskell, or someone will start a retro fad around Algol-68 or something.

Re:Kotlin is the hero Android needs by pjmlp on Friday May 19, 2017 @07:39AM (#14374620)
What?!

C++ might be a 2nd class citizen in SDK tooling, but it is supported since Android 1.5 and C++14 is fully supported.

How is that very recent?

EDIT: The NDK was actually released with v1.5 (2009), the v2.3 was when STL and exceptions support were added hence my error.

Re:Kotlin is the hero Android needs by _pmf_ on Friday May 19, 2017 @08:04AM (#14374774)
Maybe the OP meant using C++ without at least a Application dispatcher/container object written in Java. This has only been possible with the introduction of NativeActivity (which you don't need to derive from, but only refer to via the Manifest).
Re:Kotlin is the hero Android needs by pjmlp on Friday May 19, 2017 @08:07AM (#14374798)
The NativeActivity class was introduced in Android 2.3, released in December 2010, almost 7 years ago!
Re:Kotlin is the hero Android needs by krona on Friday May 19, 2017 @08:59AM (#14375125)
Historically the Android platform provided only a very minimal C++ runtime support library, with no RTTI or C++ exceptions.
Re:Kotlin is the hero Android needs by pjmlp on Friday May 19, 2017 @09:04AM (#14375173)
STL and exceptions are available since Android NDK Revision 5, released in December 2010, alongside Android 2.3.

https://developer.android.com/ndk/downloads/revision_history...

How can it be historically, when the features are available since almost 7 years?

Re:Kotlin is the hero Android needs by krona on Friday May 19, 2017 @09:47AM (#14375549)
Um, but the STLport in r5 wasn't compatible with exceptions or RTTI. It says so in CPLUSPLUS-SUPPORT.html
Re:Kotlin is the hero Android needs by pjmlp on Friday May 19, 2017 @09:49AM (#14375576)
There were other ones to choose from.
Re:Kotlin is the hero Android needs by romanovcode on Friday May 19, 2017 @09:32AM (#14375425)
No man, next week the threads will be: Why I moved from Go (Or whatever was the FOTM) to Kotlin.
Re:Kotlin is the hero Android needs by jerf on Friday May 19, 2017 @11:23AM (#14376557)
That will be a short article, though: "Because Go doesn't really work on Android. In fact, I don't even know what I was thinking. Seriously. Why'd I do that?"

(Yes, I know you can run Go code on Android but last I knew that's almost exactly literally what it is; you can run Go code on Android, but it has next to no integration with the rest of Android, just a very basic binding to things that are very cross-platform: https://godoc.org/golang.org/x/mobile/app)

Re:Kotlin is the hero Android needs by romanovcode on Friday May 19, 2017 @01:24PM (#14377702)
It's not about android. People will start using Kotlin everywhere.

Remember Swift hypetrain a year or so ago? I do. People even made web frameworks with it.

Re:Kotlin is the hero Android needs by pryelluw on Friday May 19, 2017 @09:34AM (#14375446)
7. Oracle can't sue Google over Kotlin.
Re:Kotlin is the hero Android needs by dafrankenstein2 on Friday May 19, 2017 @01:04PM (#14377529)
correct
Re:Kotlin is the hero Android needs by blackorzar on Friday May 19, 2017 @07:21PM (#14380058)
What if Oracle buys Jetbrains? :)
Re:Kotlin is the hero Android needs by mirages on Friday May 19, 2017 @07:56AM (#14374728)
I wished we could auto filter HN with certain keywords
Re:Kotlin is the hero Android needs by Arnt on Friday May 19, 2017 @08:42AM (#14375019)
hnapp.com
Re:Kotlin is the hero Android needs by IanDrake on Friday May 19, 2017 @07:41AM (#14374634)
You can write android apps in c# or JavaScript too.

I'm not sure if you consider them "supported" but they both have pretty advanced tooling for the purpose.

Re:Kotlin is the hero Android needs by StevePerkins on Friday May 19, 2017 @07:43AM (#14374653)
If you write a C# app with Xamarin and have problems, then it's Xamarin's support problem. If you write a JavaScript app with Qt (I assume?), then it's Qt's support problem.

Now, if you write an app with Kotlin, then it's Google's support problem. I can see how that would change the game for a lot of shops.

Re:Kotlin is the hero Android needs by AlphaSite on Friday May 19, 2017 @07:57AM (#14374733)
I'm not sure I trust google to support anything properly, I'm glad it's Jetbrain's problem. Atleast their tooling isn't garbage.
Re:Kotlin is the hero Android needs by m_fayer on Friday May 19, 2017 @08:32AM (#14374950)
It is much easier to squeeze support out of Xamarin than Google.
Re:Kotlin is the hero Android needs by pkolaczk on Friday May 19, 2017 @12:38PM (#14377270)
Google support - you mean this 50cm thick concrete wall developers and users are banging their heads on when they want some bugs fixed? Like e.g. this: https://productforums.google.com/forum/#!topic/hangouts/A5Rp...
Re:Kotlin is the hero Android needs by dragandj on Friday May 19, 2017 @10:01AM (#14375695)
What are you going to do if your Kotlin app has some problems? Call Google on the phone? Write and email and expect an answer?
Re:Kotlin is the hero Android needs by pkolaczk on Friday May 19, 2017 @12:40PM (#14377303)
You can write a forum post. And then you'll get confirmations from another 100 developers, so you'll definitely feel a bit better and not alone in your pain. ;)
Re:Kotlin is the hero Android needs by on_and_off on Friday May 19, 2017 @08:00AM (#14374754)
Not really.

You don't have direct access to Android's API with C#, you use a dedicated runtime wrapping your calls and allowing you to interact with the framework. This comes with a very large variety of issues.

With kotlin, you have 100% interop for free.

Re:Kotlin is the hero Android needs by kevingadd on Friday May 19, 2017 @07:43AM (#14374647)
The C# tooling is good but it's partially closed-source and sold by a vendor (Xamarin). On that basis I don't think it really 'counts'. JS does, at least, since there are many ways to ship JS-based Android apps for free.
Re:Kotlin is the hero Android needs by Maarten88 on Friday May 19, 2017 @08:04AM (#14374779)
Xamarin got bought by Microsoft, and they opened almost everything from Xamarin, except Xamarin Studio which got rebranded as Visual Studio for Mac.
Re:Kotlin is the hero Android needs by PaulHoule on Friday May 19, 2017 @07:59AM (#14374738)
Real programmers stick to algol 60!
Re:Kotlin is the hero Android needs by pjmlp on Friday May 19, 2017 @09:24AM (#14375349)
Which actually is way better than C.
Re:Kotlin is the hero Android needs by eng_monkey on Friday May 19, 2017 @07:42AM (#14374643)
> Are you new here? I'm sure that next week it'll go back to the usual threads about Rust or Haskell, or someone will start a retro fad around Algol-68 or something.

I just do not get how the disconnected list of events you provided justify the promotion of Kotlin we have seen this week. But hey, you might even be on the payroll.

Re:Kotlin is the hero Android needs by indy on Friday May 19, 2017 @07:49AM (#14374687)
The list of events seem pretty connected.
Re:Kotlin is the hero Android needs by frogfuzion on Friday May 19, 2017 @07:44AM (#14374662)
I doubt it's being paid promoted, but I don't think your cynicism is unreasonable. It is pretty obvious that the big tech companies maintain a presence on this board and attempt influence through human and automated measures.
Re:Kotlin is the hero Android needs by StevePerkins on Friday May 19, 2017 @07:50AM (#14374692)
Yeah. Those nefarious Elm and Nim cartels, using Russian hackers to push their #fakenews to the top of HN every other week.

(I feel like I'm living through a bad acid trip)

Re:Kotlin is the hero Android needs by Varriount on Friday May 19, 2017 @09:15AM (#14375270)
Eh, neither Nim nor Elm are backed by huge companies. You'll want to look at Rust and Swift for that. ;)

Seriously though, speaking as a contributor to Nim, I can confidently say no-one in the Nim community organizes massive multi-post promotion campaigns like this. The only submissions that come from the core developers are the announcements for new language versions, and (unfortunately) none of the community members seem particularly inclined to regularly submit links to libraries/blog posts either.

I'm sure Elm developers do the same thing - it's the only way for such projects to actually gain recognition among other communities.

Re:Kotlin is the hero Android needs by wtetzner on Saturday May 20, 2017 @12:21PM (#14383080)
> You'll want to look at Rust and Swift for that. ;)

Is Mozilla a "huge company"?

Re:Kotlin is the hero Android needs by ethbro on Friday May 19, 2017 @09:18AM (#14375296)
Any community of sufficient size and influence invariably becomes an astroturf target.