[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: Xavier Wang <weasley.wx@...>
- Date: Tue, 14 Jun 2011 12:02:50 +0800
2011/6/14 Lorenzo Donati <email@example.com>
On 14/06/2011 0.32, Roberto Ierusalimschy 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? :)
Well, much better than @continue: (the more I see that colon, the more I hate it. I really feel it doesn't belong there).
If colons have to be used, I think
is much better and doesn't clash with future uses as operator (well, not counting the C++ static scope operator, or however it is called).
It is symmetric and bulky. It doesn't misleadingly point backwards or forwards. Clearly marks a point in the code and, well, it brings to mind a real label or price tag!
Or, makes goto jumps into a local variable's scope:
for i = 1, 10 do
if i % 2 == 0 then goto continue end
is that OK?