Hacker News new | ask | show | jobs
by AheadOfTime295 2047 days ago
Scala 3 supports braceless syntax, aka significant indentation, aka "YAML is to JSON as Scala 3 is to Scala 2"

https://dotty.epfl.ch/docs/reference/other-new-features/inde...

There was quite some debate on this, going on strong.

2 comments

I consider this a totally useless "innovation"! As if Scala didn't have already enough possibilities to express things, no we are able to leave out braces, what makes scanning code even harder and will lead to an ugly mixture.

I would accept it, if they would decide to drop the traditional syntax. But adding yet another style, just for the sake of it, is waste of resources (of the Scala creators and Scala users).

There is a good article about the "strangeness budget" of languages, and I think that Scala doesn't spend it wisely. https://steveklabnik.com/writing/the-language-strangeness-bu...

Yuck... personally I'd want a Lint that would disallow many such syntax differences from Java: - force use of () - force use of ; - etc...