Closed TodePond closed 2 years ago
What sets the chain operator apart from the then operator?
You used the ++
chain operator as part of a term definition. But the ...
then operator can be used as part of a match sequence, so should be more intuitive.
With the chain operator:
Language (
++ Sanitise
:: Expression
)
With the then operator:
Language :: Sanitise ... Expression
Hmm, yes I can see why that would be intuitive, but I can't help but shake the feeling that ...
means that something else is omitted between the terms, like "This term makes no difference, it can be anything". Maybe using a ,
could work instead?
Also, maybe an "anything" operator could be implemented, to make use of the ...
syntax?
Yes that's true! A different thing would probably be better. The language has really turned into 'symbol hell' so maybe even then
would be good.
Language :: Sanitise, Expression
Language :: Sanitise then Expression
Language :: Sanitise & Expression
Language :: Sanitise && Expression
Language :: Sanitise and Expression
I think then
would probably work best actually, as it's clearer as to what it does, whereas and
could be interpreted as a sequence of terms, which in actuality is just a space
I'll try it out!
Also, maybe the 'any' keyword/symbol could be 'anything that is not the following term'. I'd need to make a 'not' operator or something. Not sure how it would totally work though 🤔
Closing because of upcoming rewrite
The chain operator is kinda confusing, and I think its uses could be fulfilled by an upcoming 'then' operator instead. So maybe remove it?