yasl icon indicating copy to clipboard operation
yasl copied to clipboard

Investigate User-Defined literals

Open CoffeeTableEspresso opened this issue 5 years ago • 1 comments

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.

CoffeeTableEspresso avatar Aug 12 '19 22:08 CoffeeTableEspresso

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.

CoffeeTableEspresso avatar Aug 12 '19 22:08 CoffeeTableEspresso

Currently not interested in pursuing this further.

CoffeeTableEspresso avatar Mar 31 '23 23:03 CoffeeTableEspresso