Caterpillar

Daily Thought - 2024-10-08

< back to list

Given the disadvantages of delimiter-less data structure literals, it's probably better to just use commas everywhere. [ a b ] would become [ a, b ]; [ a b 1 + ] would become [ a, b 1 + ]. It's a small sacrifice in the name of readability and simplicity.

If that's the solution, branch parameters should be updated too. They don't need delimiters to be unambiguous or readable, but I think this is a case where consistency aids learnability.

In addition, they're likely to get more complex, as more sophisticated pattern matching is introduced. Maybe having delimiters there will become advantageous or even necessary in itself.

<< previous thoughtnext thought >>