On 2014-03-04 09:03, David Townshend wrote:
On Tue, Mar 4, 2014 at 9:03 AM, Andrew Barnert
mailto:abarnert@yahoo.com> wrote: On Mar 3, 2014, at 22:02, David Townshend
mailto:aquavitae69@gmail.com> wrote: What about a new code literal object, e.g.
thunk = c'x + 3' thunk(x=2)
Why does it need to be built from/look like a string? I think it would be just as simple for the parser, and simpler for editors, and less misleading for readers, if it used a different marker.
Not that I'm seriously suggesting backticks here, but...
thunk = `x + 3`
The only real reason for it looking like a string is a shortage of symbols. Backticks are off limits, and most other symbols are just plain ugly (e.g. @x + 3@ or $x + 3$) or already in use in a way that could lead to ambiguity (e.g. |x + 3|). String-like quotes seem like a better option than the alternatives.
[snip] I'm sure that Unicode could provide some characters/codepoints. For example: thunk = 《x + 3》