3 ms·
The DSL I'm currently hacking around on has ++ for string (and list) concatenation and using a -seperate- operator seems to rather help. (I've yet to conclude
by mst 5y ago
The DSL I'm currently hacking around on has ++ for string (and list) concatenation and using a -seperate- operator seems to rather help.
(I've yet to conclude if stealing ++ for this rather than preinc/postinc was a terrible mistake, so far in context it hasn't seemed to be but I'm still keeping an eye on the question)
- brandmeyer 5y agoPerl uses ~ for string concatenation. Nothing says that you cannot use both infix "++" for concatenation and unary ++ for increment. "-" is both a unary prefix and binary infix operator, for example.
- mst 5y agoPerl uses '.' for string concatenation. Nothing says that I can't do that but in context of deliberately -not- re-using operators for completely different things it would seem rather self-defeating.
- brandmeyer 5y agoOof, you're right. I was thinking of Raku.