Live data from Hacker News

Kotlin, the Swift of Android

blog.gouline.net

61–70 of 114 posts

Re: Kotlin, the Swift of Android

#64
post #38

It would be nice if more of this was folded into Java itself, rather than existing as a new language - as the author notes a lot of it is in Java 8.

Kotlin has stuff that's unlikely to appear in Java, such as reified generics - Java has already chosen type erasure generics instead. I wouldn't bet a penny that they ever change this approach if they didn't go with it from the start.

In fact Kotlin doesn't have reified generics. This idea was planned in the beginning and was reflected in the old docs but abandoned later. I believe there's no reference to reified generics on the new web site anymore.

Re: Kotlin, the Swift of Android

#65
post #63

> This means that if text2 is null, the replace() method call is ignored and no NullPointerException is thrown. I don't understand why this is preferable.

It's intended to be shorthand for:

  if (text2 != null) {
    text2.replace()
  }
Essentially they're moving support for @Nullable and @NotNull into the language and compiler.

https://www.jetbrains.com/idea/documentation/howto.html

Re: Kotlin, the Swift of Android

#69
post #26

Earlier quoted context omitted.

Oh, thanks for the correction. I had assumed that JetBrain develops Android Studio and Google just puts their stamp on it.

Well that pretty much is what happens. JetBrains wrote IDEA and the Android support for it. Google made some small modifications (some good, some detrimental), and packaged it with the Android SDK. The biggest change was to switch to gradle which is a more powerful build system but also much buggier (at least in the current Android Studio). They also lots of useful Android-related tools and lints, and a fair helping…

Meta: Anybody knows why IshKebab was downvoted?

Re: Kotlin, the Swift of Android

#70
post #66

A lot of these things are already in Dart, which has a much nicer syntax. If they're going to switch from Java, I'd want them to choose Dart.

Dart supports shared memory multi threading?

DART has Erlang style actors that support concurrent threads of execution - so yes. Shared memory no AFAIK, but Dart seems to have nicer syntax.
Post reply on HN