Hacker News new | ask | show | jobs
by peq 1856 days ago
Scala is one of the smallest typed languages in terms of syntax.

See slide 13: https://www.slideshare.net/Odersky/preparing-for-scala-3#13

With scala 3, syntax has been simplified even more, e.g.:

No more braces necessary. Top level declarations. Extension Methods.

4 comments

> No more braces necessary

Optional braces seems like a weird feature to me. I would prefer consistently. I think a language should either be "bracey" or not. Just pick one!

I personally wanted to be able to use underscores instead of braces.
Joking? Scala 3 added 20 keywords (14 of them contextual), many of them with entirely new syntactic constructs behind it.
> Scala is one of the smallest typed languages in terms of syntax.

Eh, that slide isn't really worth looking into. None of the languages there have a uniform way to represent the grammar. If you look at the C# and Scala grammars you'll find that the Scala one is highly compacted, whereas the C# grammar is intentionally not compact. They're encoded in different formats.

I think "lots of syntax" means many rules to learn, rather than many characters to type. So this change means even more syntax.