News for hackers. Stuff that matters.
Re:Kotlin vs. Java – An Android Developer's First Impressions by thehardsphere on Wednesday May 03, 2017 @03:05PM (#14259004)
Not to sound disparaging, but could this basically be summed up as "Kotlin is the syntactic sugar version of Java"?

I mean, ignoring functional stuff which is in Java 8 but not on Android because Android is still(?) on Java 7, that's all I'm really seeing here.

Re:Kotlin vs. Java – An Android Developer's First Impressions by brentwatson on Wednesday May 03, 2017 @03:21PM (#14259143)
Android actually now has some Java 8 feature support out-of-the-box [0] though most are API 24+.

After porting our code base to Kotlin we found it provides more benefits over Java than just being less typing / "syntactic sugar". To name a few:

  - First class functional support (streams feel clunky in comparison).
  - Extension functions [1].
  - Nullable types (compile-time null checking).
  - Less verbose as types declarations are optional in many situations.
  - Great interop & tooling from JetBrains makes a slow transition from Java -> Kotlin pretty seamless.
[0] https://developer.android.com/studio/preview/features/java8-...

[1] https://kotlinlang.org/docs/reference/extensions.html

Re:Kotlin vs. Java – An Android Developer's First Impressions by yincrash on Wednesday May 03, 2017 @05:23PM (#14260247)
Were the downsides manageable? Increase in APK size / build time?
Re:Kotlin vs. Java – An Android Developer's First Impressions by pvg on Wednesday May 03, 2017 @04:12PM (#14259580)
There's a bunch of stuff the article doesn't get into, specifically Kotlin's type system which is Java-like but not quite Java's.
Re:Kotlin vs. Java – An Android Developer's First Impressions by thehardsphere on Thursday May 04, 2017 @01:46PM (#14266986)
Huh. Okay. I'll have to read more about that then.
Re:Kotlin vs. Java – An Android Developer's First Impressions by relics443 on Wednesday May 03, 2017 @10:23PM (#14261944)
Having used Java for 7 years, and using Kotlin for the past year, I would say it's the syntactic sugar version of java in the way that Java is the syntactic sugar version of C++, which is the syntactic sugar version of C which is the syntactic sugar version of ASM, etc...
Re:Kotlin vs. Java – An Android Developer's First Impressions by thehardsphere on Thursday May 04, 2017 @01:58PM (#14267116)
So what am I missing? Or rather, what is the article missing? (I knew nothing about Kotlin before this article)

I mean, I wouldn't agree with the classification of any of those languages as the syntactic sugar of whatever. C is portable ASM, which is a big deal. C++ is object oriented C, which is a different paradigm and feels a lot more salty than C because of the increased complexity. Java was rather ambitious (safe to say overly so) and brought with it a lot of differences with C++ that were not just syntax (which is definitely sweeter).

What does Kotlin give me besides less verbose syntax and some nice compile time null checking?

Re:Kotlin vs. Java – An Android Developer's First Impressions by bitmapbrother on Wednesday May 03, 2017 @03:25PM (#14259168)
As of Android 7, the following Java 8 language features are supported:

  Default and static interface methods  
  Lambda expressions  
  Repeatable annotations  
  Method References  
  Type Annotations