yasl
yasl copied to clipboard
Investigate User-Defined literals
YASL could possibly have user-defined literals. This would allow things like let pattern = r"\d+"
to represent a regex literal.
The advantage of these over a constructor function is that the contents of the string could be verified at compiled time, instead of when the function is called.
We'd need a way for the object to be serialized and deserialized. This would only be supported via the C API, not from YASL.
Currently not interested in pursuing this further.