Live data from Hacker News

Why Kotlin is my next programming language (2015)

medium.com

111–120 of 185 posts

Re: Why Kotlin is my next programming language (2015)

#111

> Kotlin comes from industry, not academia. It solves problems faced by working programmers today. As an example, the type system helps you avoid null pointer exceptions. I'm sorry but you just undercut your own anti-intellectualism better than I could right there. (There exist languages which have guarded against this without loss of expressive power since before Java and, oh, are from academia.)

>(There exist languages which have guarded against this without loss of expressive power since before Java and, oh, are from academia.)

So? Their academic status might solve this, but create other problems still.

E.g. lack of an actual commercial ecosystem, too much emphasis on research-y features, immature tooling, etc.

Re: Why Kotlin is my next programming language (2015)

#112
post #62

Earlier quoted context omitted.

A better example of 'engineering not academy' would be explicit vectorization, memory layout support and a good FFI. (all the stuff that in theory is better managed by compilers, in practice it either doesn't matter at all or else should be left to humans). Please correct me if I'm wrong, but Kotlin doesn't improve on Java in these areas.

It would be awesome if there would be some JVM language that supported explicit vectorization, memory layout support and a good FFI. But it also seems impossible. How would any JVM language have memory layout support while at the same time running in the memory managed sandbox of the JVM?

Well, project Panama is aiming to add those things to the JVM, so you may get your wish in a few years.

Re: Why Kotlin is my next programming language (2015)

#113

Earlier quoted context omitted.

The underlying idea is that it shouldn't handle the wrong type at all, it should fail. If some function A calls function B with a wrong type, the problem is with function A. So basically, there should be only type tests after IO functions (probably after parsing), the rest can be assertions.

And you don't need tests to make sure the assertions are there?

Interesting point :)

At some point you have to assume something is there and correct (e.g., you don't write tests to check whether the tests are there, also you assume the testing tools work, ...).

In static languages you also assume the programmer set the right type for the function argument, so you might as well assume to have an assertion in the critical code of the functional languages.

Re: Why Kotlin is my next programming language (2015)

#114
post #100

Wow, so much negativity here O.o Kotlin is getting rapid adoption in the Android community and is quickly getting the same status as Swift has in the iOS world. The main reasons for the rapid adoption are: - It's designed to easily integrate into existing Java codebases. This means that starting to use Kotlin is pretty much a case of adding two Gradle dependencies and source files into `src/kotlin`. Interop with Java…

> quickly getting the same status as Swift has in the iOS world. What's keeping Swift itself from eventually becoming the preferred language for Android as well?

It's a non starter as the main language since it's not JVM based.

As a C/C++ alternative for native development on Android... possibly.

This will be in great part decided by

1) How frustrated native Android developers currently are with C/C++ (I don't have the feeling they are much) and

2) How much resources Apple will dedicate to make Swift viable on Android (hard to imagine they would be that interested helping out the #1 player in that space while their #2 spot is shrinking on a daily basis).

Re: Why Kotlin is my next programming language (2015)

#115

Earlier quoted context omitted.

It still is. Kotlin advocates are just very loud, while Scala devs are busy shipping real-world software projects.

If Brainfuck had the marketing dollars that Typesafe spent then you would see real-world shipping Brainfuck projects. It wouldn't make Brainfuck a good language.

Considering how bad Typesafe is at promoting Scala, Scala's overwhelming success is _despite_ Typesafe's involvement, not because of it.

Re: Why Kotlin is my next programming language (2015)

#116
post #62

> Kotlin comes from industry, not academia. It solves problems faced by working programmers today. As an example, the type system helps you avoid null pointer exceptions. I'm sorry but you just undercut your own anti-intellectualism better than I could right there. (There exist languages which have guarded against this without loss of expressive power since before Java and, oh, are from academia.)

A better example of 'engineering not academy' would be explicit vectorization, memory layout support and a good FFI. (all the stuff that in theory is better managed by compilers, in practice it either doesn't matter at all or else should be left to humans). Please correct me if I'm wrong, but Kotlin doesn't improve on Java in these areas.

Have a look at Scala Native.

Despite its young age it creates really fast, tight code (they have issues benchmarking things because Dotty Linker + LLVM gets rid of too much stuff).

Re: Why Kotlin is my next programming language (2015)

#117
post #100

Wow, so much negativity here O.o Kotlin is getting rapid adoption in the Android community and is quickly getting the same status as Swift has in the iOS world. The main reasons for the rapid adoption are: - It's designed to easily integrate into existing Java codebases. This means that starting to use Kotlin is pretty much a case of adding two Gradle dependencies and source files into `src/kotlin`. Interop with Java…

> - It's standard library is small (~700KB), which is a stark contrast to Scala and some other JVM languages, which pretty much demand usage of ProGuard while developing due to large method count.

A Scala Hello World is around 30 kB, it can get more as you keep using more of the standard library, but to be realistic, it's around a few hundred kBs.

Not sure what's the big deal with ProGuard it's just a deployment detail. Compilation seems to be faster with SBT and ProGuard than Java/Kotlin/... without ProGuard.

Re: Why Kotlin is my next programming language (2015)

#118
post #99
post #22

Earlier quoted context omitted.

Sure. Plenty of Java-based games do this.

This may come off a bit snarky but is there really plenty of Java games out there? If so, anything anybody might have heard off?

Minecraft was somewhat popular a few years ago. :P

Runescape also used to be a pretty big one, even if it's been shrinking lately AFAIK.

Re: Why Kotlin is my next programming language (2015)

#119
post #99
post #22

Earlier quoted context omitted.

Sure. Plenty of Java-based games do this.

This may come off a bit snarky but is there really plenty of Java games out there? If so, anything anybody might have heard off?

Minecraft would be one that a few people have heard of...

Many games on Android are also Java based obviously.

Re: Why Kotlin is my next programming language (2015)

#120
post #62

Earlier quoted context omitted.

A better example of 'engineering not academy' would be explicit vectorization, memory layout support and a good FFI. (all the stuff that in theory is better managed by compilers, in practice it either doesn't matter at all or else should be left to humans). Please correct me if I'm wrong, but Kotlin doesn't improve on Java in these areas.

Have a look at Scala Native. Despite its young age it creates really fast, tight code (they have issues benchmarking things because Dotty Linker + LLVM gets rid of too much stuff).

Thanks. It is too early to say if it would be of any use, however, since they don't talk about freeing these native data structures.
Post reply on HN