3 ms·
But you can make custom sigils.
by nixpulvis 8y ago
But you can make custom sigils.
- inferiorhuman 8y ago> But you can make custom sigils. Judging by the downvotes I seem to have set off the Elixir fanboys. You can't define additional string interpolation syntax with Rust, but you can define custom functions to convert from a string to any given type with the Into trait. You can also use arbitrary delimiters with the raw string syntax. As another comment pointed out, Scala lets you define the equivalent of custom sigils. Elixir brings good, bad, new, and old things to the table but custom sigils are not particularly new or unusual.
- kodablah 8y agoStill similar things are available in other languages, e.g. https://docs.scala-lang.org/overviews/core/string-interpolation.html https://docs.scala-lang.org/overviews/core/string-interpolat...