This is my view of what a dream scenario for the new syntax in Scala 3 would look like, and why I think it's better than the current syntax implemented in Dotty.
A diff of the EBNF syntax can be found here: https://github.com/lampepfl/dotty/commit/9638ebfeec002554897836b2c97f70e371f26cdd
The main goal in this alternative is to prioritize ease of reading over ease of writing. Code is generally written once, and then read (and edited) over and over again.
My only two remaining grievances with the current syntax is this:
- Giving new meaning to
:
is confusing. It's one of Scala most important symbols that already has two meanings depending on whether it's a context bound or type declaration.