Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I've used Scala in production environments, and we never had any problems with it being too academic. SBT sucks, but that's another issue.

Kotlin doesn't have typeclasses (something you get as a side effect of Scala implicits), ADTs, or true pattern matching (along with exhaustivity checks). In combination, all of those allow for expressive, easy-to-read code that, in my experience, tends to have few bugs. Kotlin is a step backwards from that. It's still a significant step up from Java, however.

F# is the only other language I've used that I've found comes close. However it lacks typeclasses, and the large Java ecosystem.



A step backward to you is a step forward in pragmatism for the rest of the world.

I understand the value of higher kinds and I'm comfortable with Haskell, but it's pretty obvious to me why Kotlin is succeeding where Scala failed.

Sometimes, improvements in programming languages are reached by having fewer features, but Scala is a kitchen sink that was always unable to turn down features, just because their implementation would lead to more research papers to submit to conferences.

As a result, we ended up with a monster language that contains every single feature even invented under the sun.


AFAIK Scala is much more popular than Kotlin in terms of job postings and projects in big enterprises. My data limited to some Fortune 100 companies tell me it is on par with Python in popularity. Spark, Kafka, Flink, Finangle are written mostly in Scala. Pretty impressive for an academic, non-pragmatic language that has failed, isn't it?

So can you elaborate what do you mean by "failed"? Because it seems you are using a different definition of it.

"Sometimes, improvements in programming languages are reached by having fewer features, but Scala is a kitchen sink that was always unable to turn down features, just because their implementation would lead to more research papers to submit to conferences."

That's some different language you're talking about. Scala is built on a small set of very powerful, general, orthogonal features which cooperate nicely and allow to build most of the stuff as libraries. Its design is much more principled than Kotlin's. Kotlin has special features built into the language, that Scala needs just a library for.


Just a note; while there aren’t typeclasses in F#, you can use statically resolved generics with a member constraint, getting you pretty close.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: