4 ms·
I think the best evolution of a programming language is when some features are removed and replaced by a unifying concept which makes the language both smaller
by augustk 5y ago
I think the best evolution of a programming language is when some features are removed and replaced by a unifying concept which makes the language both smaller and and more expressive. Has that happened in Scala 3?
- kjaer 5y agoYes! See the redesigned implicits [1] and macros [2]. [1]: https://dotty.epfl.ch/docs/reference/contextual/motivation.html https://dotty.epfl.ch/docs/reference/contextual/motivation.h... [2]: https://dotty.epfl.ch/docs/reference/dropped-features/macros.html https://dotty.epfl.ch/docs/reference/dropped-features/macros...
- valenterry 5y agoI totally agree with that sentiment. Not only about evolution but in general. A good programming language trues to use unifying concepts as much as possible. Fortunately, Scala is one of the best (statically typed) languages in that regard that I ever used.
- agbell 5y agoIn 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.
- dtech 5y agoScala 3 isn't such a language, most of the stuff people use is still there. The biggest change touching your comment is replacing one feature (implicits) with a couple more tailored features (extension methods, conversions and context parameters). In practice they were very powerful and versatile, but also complicated, finicky and bug-prone. Feels a bit like pointers in that regard.