3 ms·
In some areas it is explicitly the opposite that happened, and in a way that is for the best — see implicits. Scala 2 is a very flexible language and a lot of
by agbell 5y ago
In some areas it is explicitly the opposite that happened, and in a way that is for the best — see implicits.
Scala 2 is a very flexible language and a lot of outsider complaints seem grounded in this flexibility.
Scala 3 is more opinionated in some ways:
"Opinionated: Contextual Abstractions
One underlying core concept of Scala was (and still is to some degree) to provide users with a small set of powerful features that can be combined to great (and sometimes even unforeseen) expressivity. For example, the feature of implicits has been used to model contextual abstraction, to express type-level computation, model type-classes, perform implicit coercions, encode extension methods, and many more. Learning from these use cases, Scala 3 takes a slightly different approach and focuses on intent rather than mechanism. Instead of offering one very powerful feature, Scala 3 offers multiple tailored language features, allowing programmers to directly express their intent
"
I think it is a very practical and grounded focus change.
https://docs.scala-lang.org/scala3/new-in-scala3.html https://docs.scala-lang.org/scala3/new-in-scala3.html
- mnd999 5y agoIt’s a shame it’s got less opinionated in other ways. Scala developers must be really looking forward to the endless debates over curly brackets vs white space.
- neysofu 5y agoI still can't believe they went for that. I wouldn't really care if the team wanted to switch to significant indentation, but it's absurd to provide two altogether different syntaxes just for the sake of it.
- hocuspocus 5y agoIt isn't for the sake of it, breaking source compatibility would have been a major annoyance.
- peq 5y agoI don't think i will be much of a problem. Braces are already optional in Scala2 if you only use a single expression. The change just gives you the option to be more consistent and remove braces everywhere.