January 2020
Intermediate to advanced
532 pages
13h 31m
English
There is a special kind of macro for defining nonstandard string literals, which look like a literal string but instead a macro is called when it is referenced.
A good example would be Julia's regular expression literal—for example, r"^hello". It is not a standard string literal because of the r prefix in front of the double quote. Let's first check the data type of such a literal. We can see that a Regex object is created from the string:

We can also create our own nonstandard string literals. Let's try to work through a fun example together here.
Suppose that, for development purposes, we want to conveniently ...
Read now
Unlock full access