Sigils are a great way to create a shorthand function that takes an (optionally interpolated) string as input, and returns some kind of useful data structure.
Because there are only 26 letters in the alphabet (out of which c, r, s and w are already taken), I think that conflicts between different sigils using the same letter will increase. Of course it is a possibility to alias or wrap certain sigils as other sigils using a different letter, but this greatly increases source code complexity. Of course, another option would be to always use a long-hand alternative to the sigil (which
should be available in a module, although this is not enforced by Elixir), but this does net let you use the conciseness of the sigil.
I believe that a better solution would be to allow two- and three-letter sigil names. This would both reduce conflicts as well as allow sigil names that are easier to recognize and remember.
Say I want to create a sigil that transforms multiple colour representations into hex format (or maybe another format like HSL depending on the supplied options). I cannot(should not) use `~c{}` because that's used by Elixir itself to build char lists. Using `~col{}` would make the sigil more or less self-documenting. (with 'more or less' I mean that if you see it used in practice, e.g. `~col{red}` or `~col{light green}` you'll understand it. And after you know once what the `col` sigil identifier means, it is probably easier to recall it later than if it were just a single letter.)
Another example: If I want to create a sigil that converts a Roman Numeral to an integer. The use of `~r{}` is also already defined by Elixir. But what else to call it? `~rn{}` would be a logical choice.
Is this a reasonable idea? Or are there problems I did not think of?