Hacker News new | ask | show | jobs
by njs12345 5267 days ago
I was quite interested in Kotlin, but Xtend is already out, and does most of the interesting stuff.

I think there's definitely room for a "better Java" - most Java devs should be able to pick up Kotlin or Xtend and be more productive very quickly.

With regard to FP, I think the presence of closures is enough to do a large proportion of the things you'd want.. What do you see lacking in these?

1 comments

I'd like to see greater integration into the libraries and commonly used types. Strings in Scala for example let you perform all manner of filtering and other functional operations. Collections in Scala also support operations like map, filter and partition etc. Scala feels more like a fusion between functional and object-oriented programming, rather than a slightly prettier Java with closures.
Kotlin is in preview. They explicitly said they plan to extend java types like String and add a lot of stdlib stuff. Just don't forget that scala is 10 years old, while Kotlin is 6 months.
I think Xtend has extension methods for any Iterable that do what you want: http://download.eclipse.org/modeling/tmf/xtext/javadoc/2.0.1...

Point taken on Strings though - in this situation you'd want String to extend Iterable but it doesn't for historical reasons.