[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: I'd give my right arm for a continue statement
- From: Greg Falcon <veloso@...>
- Date: Fri, 28 Jan 2011 11:52:51 -0500
On Fri, Jan 28, 2011 at 11:08 AM, David Kastrup <dak@gnu.org> wrote:
>> and it wouldn't break any
>> existing code, since a string literal can't legally follow 'do' or
>> 'break' in Lua today.
>
> do 'not?':format() end
>
> Surprisingly, it works only with parens around the string in Lua 5.1,
> but shouldn't it work in 5.2?
This has been discussed from time to time already, and it's not
immediately clear that allowing this is desirable. See:
http://lua-users.org/lists/lua-l/2008-12/msg00164.html
In any event, even if Lua 5.2 were to adopt "x":y() as valid syntax,
my original statement that this proposal "wouldn't break any existing
code" still stands. (I admit that literals as labels might be less
desirable in such a world, however.)
Greg F
- References:
- I'd give my right arm for a continue statement, Steve Litt
- Re: I'd give my right arm for a continue statement, steve donovan
- Re: I'd give my right arm for a continue statement, HyperHacker
- Re: I'd give my right arm for a continue statement, Michal Kottman
- Re: I'd give my right arm for a continue statement, steve donovan
- Re: I'd give my right arm for a continue statement, Alexander Gladysh
- Re: I'd give my right arm for a continue statement, steve donovan
- Re: I'd give my right arm for a continue statement, Roberto Ierusalimschy
- Re: I'd give my right arm for a continue statement, Greg Falcon
- Re: I'd give my right arm for a continue statement, David Kastrup