|
On Jun 13, 2011 4:33 PM, "Roberto Ierusalimschy" <roberto@inf.puc-rio.br> wrote:
>
> > If the start character must be something unused in Lua, there are
> > few alternatives among ASCII: #, $, |, &, ?, !, `.
>
> Actually it can be a new token, as Tony suggested. For instance, Ada
> uses the syntax <<label>>.
>
>
> > Probably the best bets are # and $, since the other may better serve
> > as operators in Lua 9.5 :-P :-)
>
> Should << and >> be reserved for 9.5? :)
>
> -- Roberto
>
I like the "label::" suggestion myself.
This talk of new operators reminds me of a patch I tried to make that made @ and $ legal in variable names, and @foo/$foo equivalent to @(foo)/$(foo), for user-defined prefixes. Never got it quite working though.
--
Sent from my toaster.