Hacker News new | ask | show | jobs
by StevePerkins 3319 days ago
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.

7 comments

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.

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).
The NativeActivity class was introduced in Android 2.3, released in December 2010, almost 7 years ago!
Historically the Android platform provided only a very minimal C++ runtime support library, with no RTTI or C++ exceptions.
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?

Um, but the STLport in r5 wasn't compatible with exceptions or RTTI. It says so in CPLUSPLUS-SUPPORT.html
There were other ones to choose from.
No man, next week the threads will be: Why I moved from Go (Or whatever was the FOTM) to Kotlin.
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)

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.

7. Oracle can't sue Google over Kotlin.
correct
What if Oracle buys Jetbrains? :)
I wished we could auto filter HN with certain keywords
hnapp.com
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.

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.

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.
It is much easier to squeeze support out of Xamarin than Google.
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...
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?
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. ;)
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.

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.
Xamarin got bought by Microsoft, and they opened almost everything from Xamarin, except Xamarin Studio which got rebranded as Visual Studio for Mac.
Real programmers stick to algol 60!
Which actually is way better than C.
> 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.

The list of events seem pretty connected.
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.
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)

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.

> You'll want to look at Rust and Swift for that. ;)

Is Mozilla a "huge company"?

Any community of sufficient size and influence invariably becomes an astroturf target.