Hacker News new | ask | show | jobs
by Cyph0n 3387 days ago
Sounds like good news to me, but I'm not sure why this is not getting more attention. Isn't Java 8 support a huge deal for Android, or am I missing something?
4 comments

It would be awesome. There are some polyfilling libraries, like Retrolambda for lambdas, and ones to get streams etc already, without actually using Java 8.

Jack broke a lot of things on Android (like some annotation libraries, which the article mentions), so I think the wider Android community will be happy there's a clear path forward to Java 8.

Enabling Jack also prevented the ability for devs to use Instant Run. It's not a dealbreaker, but combined with all the other broken libraries it definitely added to the frustration with needing/wanting to upgrade to Java 8. I never found it worth upgrading and almost always ignored sample code that showed Jack/Java8 in the gradle files because they didn't seem to be based on real-world usage.
They already had something called Jack that let you use java>6 features. It just didn't integrate as well with some parts of the android ecosystem
I don't really care, now that I'm invested in Kotlin.
It still seems like good news. If they had decided to focus their efforts on Jack (compiling Java source code directly to Dalvik bytecode) the parts of the toolchain that work with Java bytecode (such as the output of the Kotlin compiler) would have been de-prioritized and might not have been as well supported.
At this point I think any serious shop should be transitioning to Kotlin (just like iOS shops are transitioning to Swift).
Swift is officially an Apple language.

While Kotlin is nowhere to be seen on Android SDK and Google is officially silent on its use.

This matters a lot to customers IT departments, writing the set of delivery languages on their Requests For Proposal to consulting companies.

Ruby, Python, JavaScript, Java and others also aren't "official Google", "Apple", "Microsoft" languages and they still run the whole web. It really question the brokenness of a company processes that refuses to use good tooling just because a corpo didn't tell them to.

Kotlin is full interoperable with Java APIs and libraries and at this point there's really very few cases where it's not a significantly better choice for Android development.

It is not the question of telling to, it is the question of accepting to sign the contract at all, or pay at the end.
That's true for now. But there's nothing stopping Google from making changes to Android which break Kotlin support in ways we could never predict. From that standpoint, Java seems much less risky if you're building a large app that you expect to have to maintain and support for years to come.
> But there's nothing stopping Google from making changes to Android which break Kotlin support

It won't, that's what they addressed in this post by ditching jack and switching back to javac bytecode.

"Over time, we realized the cost of switching to Jack was too high for our community when we considered the annotation processors, bytecode analyzers and rewriters impacted."

Now you ask, SCADE partners with PerfectlySoft is now release SCADE for beta testing, you can run Swift coding on iOS and Android (Swift or C to JNI support is in their roadmap).

http://scade.io or chat slack channel perfect.ly to chat with the team.