3 ms·
Are sigils (~) restricted to one char? To me seems ~Zig would be more clear and short enough.
by G4BB3R 2y ago
Are sigils (~) restricted to one char?
To me seems ~Zig would be more clear and short enough.
- Miner49er 2y agoErlang sigils are not, they can be any length, limited to characters allowed in atoms. Elixir sigils also allow multiple characters in the name, but chars after the first must be upper case, according to the docs. So for Elixir, it would have to be something like ~zIG
- throwawaymaths 2y agoAccording to the docs, must be all upper case: > Custom sigils may be either a single lowercase character, or an uppercase character followed by more uppercase characters and digits. https://hexdocs.pm/elixir/sigils.html https://hexdocs.pm/elixir/sigils.html
- Miner49er 2y agoAh yeah, you're right.
- Muromec 2y agoWait, erlang has sigils?
- com 2y agoYeah, there’s a bit of a developer experience push going on in erlang world, which is great!