Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
1–10 of 11 posts
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#2Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#3Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#4Scala is a much more functional language than Kotlin. Scala has inbuilt support for constructs like monads etc. Kotlin needs library like Arrow.
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#5If you're looking to stay in the world of JVM and want something functional, enjoyable, and a little different, check out Clojure.
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#6If you're looking to stay in the world of JVM and want something functional, enjoyable, and a little different, check out Clojure.
Thank you. I am just curious to compare these two. Clojure is a whole different language (as I understand it), while Kotlin and Scala are more or less of the same league.
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#7OVERVIEW - Scala is much more of a functional programming language - Scala has a steeper learning curve - Scala community/ecosystem leans much more towards FP - Kotlin is like Functional Programming "lite"
LANGUAGE - Scala: has higher kinded types - Scala: has for comprehensions - Scala: has type classes - Scala: has built in support for monads - Scala: has better support for encoding errors at compile time
MARKET - Kotlin: has heavy usage on Android - Kotlin: on the server side is pretty active too - Kotlin: integrates nicely with java - Kotlin: multi-platform support
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#8I think the main differences Scala being much more of a functional programming language where as Kotlin is a bit of a balance between Java/OOP and FP and affects the complexity/learning curve of the respective languages. OVERVIEW - Scala is much more of a functional programming language - Scala has a steeper learning curve - Scala community/ecosystem leans much more towards FP - Kotlin is like Functional Programming…
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#9I think the main differences Scala being much more of a functional programming language where as Kotlin is a bit of a balance between Java/OOP and FP and affects the complexity/learning curve of the respective languages. OVERVIEW - Scala is much more of a functional programming language - Scala has a steeper learning curve - Scala community/ecosystem leans much more towards FP - Kotlin is like Functional Programming…
Choosing Scala with the intent of only using the simpler parts isn't a path I've seen work out. Maybe with strong dev culture, documentation, and tooling that could work. My experience has been that you end up with more complex implementations than you wish you had to maintain. The other way to go is to hire for it--so everyone is competent and comfortable with that level, at which point it's typically not the subset…
> My experience has been that you end up with more complex implementations than you wish you had to maintain.
Don't you get that with any language? I for one always find myself in a battle against complexity, no matter the language.
Re: Ask HN: Functional programming in Kotlin vs. Scala advantages/disadvantages?
#10Earlier quoted context omitted.
Choosing Scala with the intent of only using the simpler parts isn't a path I've seen work out. Maybe with strong dev culture, documentation, and tooling that could work. My experience has been that you end up with more complex implementations than you wish you had to maintain. The other way to go is to hire for it--so everyone is competent and comfortable with that level, at which point it's typically not the subset…
It's fine, actually. I've been working many teams over the last eight years using Scala. The important thing is to know where you _don't_ want to go and you'll be fine. Clean code is a developer's agreement. > My experience has been that you end up with more complex implementations than you wish you had to maintain. Don't you get that with any language? I for one always find myself in a battle against complexity, no…
Metaprogramming or code generation is similar. You can certainly make smaller, more sophisticated solutions with it. I would consider that has a comprehensibility cost and need some justification for its use, if not merely for academic/learning purposes. Maintainability could go either way depending on the situation and team composition.