Comment by AdrenalinMd
13 hours ago
I still write Scala. But not sure for how long. I swear, it's such a joy to write code in Scala.
It's like French poetry.. So much elegance. An no effect system BS. Just like Martin Odersky intended it to be!
13 hours ago
I still write Scala. But not sure for how long. I swear, it's such a joy to write code in Scala.
It's like French poetry.. So much elegance. An no effect system BS. Just like Martin Odersky intended it to be!
I like a lot of Scala but dislike implicits. I feel like it is the wrong abstraction in that it is similar to implicit type conversion in C/C++, making it harder to reason about what the code is doing and navigating to the types/methods being called.
I prefer extension methods for what Scala implicits do [1], [2]. The only part that is lacking with extension methods is to be able to extend a type to implement an interface, e.g. Comparable, but you can create extension methods that return anonymous objects [3].
[1] https://kotlinlang.org/docs/extensions.html#anonymous-extens...
[2] https://learn.microsoft.com/en-us/dotnet/csharp/programming-...
[3] https://discuss.kotlinlang.org/t/extensions-function-to-impl...
>it's such a joy to write code in Scala.
Yes, but also a bit of a torture to read code in it..
Scala is its own worst enemy in this respect. It’s both too close to Java and too far.
Too far: there are several dialects one can use with it e.g., I can speak Haskell with Scala grammar. Unlike with Java there is no central Scala dialect, so reading/maintaining a Scala codebase can be a challenge.
Too close: its type system, as advanced as it is, is still stuck in Java’s inheritance and all its limitations. Traits, for example, are not runtime components, they dissolve into the hosting class’ single object, giving up the independent identity and flexibility of runtime configured composition. And the Scala 3 `exports` feature that departs Java’s inheritance is just forwarding, not true delegation; it is the inverse of traits: it trades self identity for independent identity (no late-bound self that comes free with impl inheritance).
Yes it is like French poetry - not many people like it. I've been on a Spark project the last 2 years and its a horrible code base. Everyone on the team hates it, will move to PySpark next year. Scala is dead.
Agree. Really enjoy it—without type effects libs.
Curious what you meant about the effect system BS?
I'm assuming they mean Scala doesn't have the tortured Haskell IO monad.
Scala doesn't have an IO monad by default, but ZIO, CatsEffect, and probably others are fairly popular in at least some parts of the community. IMO it's kind of the worst of both worlds (all the complexity, none of the guarantees), but it's definitely there.
Oh. It does. https://github.com/zio/zio
Thankfully, not in the core language :)
1 reply →