Live data from Hacker News

The Kotlin Language: 1.0 Beta Is Here

blog.jetbrains.com

21–30 of 102 posts

Re: The Kotlin Language: 1.0 Beta Is Here

#21
post #16

Earlier quoted context omitted.

Can't do much FP in Kotlin. Unless your definition of FP is programming with lambdas.

I agree. One thing that is sorely missing, for example, is a way to define recursive values. In Scala, to express a recursive parser combinator: val e = p | e You can't define such a thing in Kotlin. Atleast, this was the case the last time I looked at it.

Wow can you really write

    val e = p | e
in Scala? How does that work with eager evaluation?

Re: The Kotlin Language: 1.0 Beta Is Here

#22
post #3

Looking at the syntax briefly it seems very similar to Scala. Is there any major differences between Scala and Kotlin?

i'll wager a guess: kotlin compiles faster.

Much faster. So very much faster. I won't trade off so many features for compile speed as to make Go seem like a good idea, but Kotlin is hitting a really nice balance for me between Java and Scala on the feature/iteration-loop front.

Re: The Kotlin Language: 1.0 Beta Is Here

#23

Looking at the syntax briefly it seems very similar to Scala. Is there any major differences between Scala and Kotlin?

Can't do much FP in Kotlin. Unless your definition of FP is programming with lambdas.

(disclaimer: I think Kotlin is cool)

And non-lazy map/reduce/filter. Which I almost see as a deal-breaker.

Re: The Kotlin Language: 1.0 Beta Is Here

#24

Looking at the syntax briefly it seems very similar to Scala. Is there any major differences between Scala and Kotlin?

Can't do much FP in Kotlin. Unless your definition of FP is programming with lambdas.

Which is mostly what used to be, 10 years ago. Closures, map, fold, etc. Before Haskell and Clojure like immutability and extra trimmings became fashionable...

In 1995 or even 2000 era LISP discussions you rarely if ever see those other concerns about FP that hipster functional programmers bring forward today.

(I guess it's also something that was helped by Moore's Law style speed development slowing down and the advancements in multicores...)

Re: The Kotlin Language: 1.0 Beta Is Here

#25
post #24

Earlier quoted context omitted.

Can't do much FP in Kotlin. Unless your definition of FP is programming with lambdas.

Which is mostly what used to be, 10 years ago. Closures, map, fold, etc. Before Haskell and Clojure like immutability and extra trimmings became fashionable... In 1995 or even 2000 era LISP discussions you rarely if ever see those other concerns about FP that hipster functional programmers bring forward today. (I guess it's also something that was helped by Moore's Law style speed development slowing down and the adv…

FP doesn't even have a definition (though pure-FP does, but it, too, can be a bit ambiguous and depends on how you define effects). FP is mostly accepted to be those patterns practiced by people in the FP community. I heard someone deeply involved with FP say, "FP is more a community than a well-defined programming style".

Re: The Kotlin Language: 1.0 Beta Is Here

#26
post #16

Earlier quoted context omitted.

I agree. One thing that is sorely missing, for example, is a way to define recursive values. In Scala, to express a recursive parser combinator: val e = p | e You can't define such a thing in Kotlin. Atleast, this was the case the last time I looked at it.

Wow can you really write val e = p | e in Scala? How does that work with eager evaluation?

It's not eager. The | combinator takes lazy parameters (called pass-by-name in scala). So it essentially gets translated to:

val e = operator_pipe(() => p, () => e)

Note that the operator_pipe() itself returns a function, which gets assigned as a value to `e`. So there is lots of implicit laziness.

Re: The Kotlin Language: 1.0 Beta Is Here

#27

Earlier quoted context omitted.

Can't do much FP in Kotlin. Unless your definition of FP is programming with lambdas.

(disclaimer: I think Kotlin is cool) And non-lazy map/reduce/filter. Which I almost see as a deal-breaker.

It's not that hard to implement your own stream abstraction.

Re: The Kotlin Language: 1.0 Beta Is Here

#28

Earlier quoted context omitted.

Can't do much FP in Kotlin. Unless your definition of FP is programming with lambdas.

(disclaimer: I think Kotlin is cool) And non-lazy map/reduce/filter. Which I almost see as a deal-breaker.

Kotlin does have lazy map/reduce/filter: those are available through the Sequence interface.

Re: The Kotlin Language: 1.0 Beta Is Here

#29
I tried Kotlin in one small project, which used Java API and I can recommend it. There are a lot of handy features there.

There were quite a bit of breaking changes, but, of course, it's expected from unreleased language. It wasn't hard to fix things.

For me Kotlin is in sweet spot between verbose Java and complex powerful Scala. From a practical point of view, I would prefer it to both. Any competent Java programmer will catch Kotlin fast enough, and it has almost anything I would want from a "improved Java" language.

Re: The Kotlin Language: 1.0 Beta Is Here

#30
post #9

I've been using Kotlin on Android for about six months, and can't recommend it highly enough. If you're stuck in the Java ecosystem, Kotlin will make your life much better. I also recommend it for people coming from the world of dynamic typing (Ruby, Javascript, Python, etc.). If you can appreciate the guarantees of a static type system -- and I submit that anyone who has worked on a project of more than a few KLOC c…

How does it affect built time and the feedback cycle?
Post reply on HN