3 ms·
> There are some syntactic quirks that don't convey any obvious benefit, like the use of '>' to indicate a return type. [...] why not use the much more common '
by cabalamat 3y ago
> There are some syntactic quirks that don't convey any obvious benefit, like the use of '>' to indicate a return type. [...] why not use the much more common ':' or even '->'?
Agreed. New languages should use similar conventions to popular existing languages, for the sake of familiarity, unless there are obvious benefits to doing something else.
> Similarly, I understand the mimetic quality of '[str]' for 'array of str'
It's quite Haskell-like.
> but '{str, int}' doesn't have the same ring since key/value pairs are separated by ':'.
Indeed. `{str:int}` would be better.