Quote/literal concatenation #56
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Need a special function symbol, ideally ‘, which quotes expressions. So the value of ‘min(3,4) is the funcall expression min(3,4), rather than the computed value 3. This will have to have a special shortcut in parser.c. This way, the special semantics of eval can be eliminated, because we can make the value of another cell be an expression.
As an additional idea, ‘ with more than one argument can stand in as a “literal concatenation” of values of disparate token types. Thus, if not all of its arguments are strings, the "concat" function would produce one of these ‘-expressions as its value. They would print the same way, by concatenating the print representation of all of their arguments. An advantage of this additional idea is if there were style tokens (see #55) in the list of items being literally concatenated, when they were emitted they could alter the style being produced mid-value.
Quite possibly this quote/literal concatenation should be a distinct token type, as it is handled differently in eval, etc.