Starting with what I feel is most important:
The question I’m asking here is a slightly more fundamental one: why this particular collection of sigils, and no others? It’s not even necessarily about combining sigils: it just seems a bit arbitrary to me that a dialect can use @word
or :word
or #word
or &word
, but not $word
or ~word
or \word
. And if we treat all of those uniformly, it makes sense to extend it even further to allow combinations of characters too.
I do see this as having real utility in dialects. For instance, a dialect to interface with C++ code might use this to refer to ::global
variables. Or a statistical modelling library might want to follow precedent when talking about regression ~parameters
. Or filesystem operations on Windows might want to refer to \\REMOTE
directories… anyway, you get my point, hopefully.
I think this is probably the single strongest argument against these ‘generalised sigils’: some datatypes need to have a different underlying representation, even if they look similar on the surface. I’m not sure if there’s a way to work around that.
Fair enough. But I think such things can be worked around: for instance, the parser could ignore the relative positions of the sigils, making :^word
and ^:word
merely two ways of spelling the same thing. (It already does this with e.g. {string}
vs "string"
.)
I don’t completely understand this position. Is there any particular reason you feel this way, or is it more just a gut feeling?
Indeed… which is why, when this seeming inconsistency makes me feel uneasy, I made this post to figure out which of the two must change!