lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I also think that labels should be per block. I think that the previous behaviour was really natural once familiar with the lua synthax, avoid the need of making the inventory of all the labels used in the function to know how to called the next local-use label (such "continue"-like) and eventually can lead to new possibilities since it's more general. The passage to labels per function is just an extra-mechanism of protection against supposed "mindless user" that doesn't have any reason to be: - users don't need we take care of them with such limitations. They want to learn and are supposed to be sufficiently open minded. - the previous mechanism (as already stated) was really natural in the lua context, using the same notions of scope than local variables, and would be quickly adopted. What's more, I don't see any improvement given by this modification since only a limitation has been added without giving any new possibility, so it seems me nonsense. Actually, before that the goto was implemented by the Lua developers, the way I used to imagine it was as it's now in beta-rc2, because well, I'm not expert in theses things and it's the only way I know. But when I've seen the implementation in beta-rc1, I've been really well surprised to see how they had adapted this mechanism in a innovative and "Lua" way. So my personal opinion is that I would prefer to see the previous implementation coming back.



-----Message d'origine----- From: dcharno
Sent: Wednesday, June 22, 2011 8:42 AM
Cc: Lua mailing list
Subject: Re: [ANN] Lua 5.2.0 (beta-rc2) now available

On 06/22/2011 02:32 AM, Miles Bader wrote:
dcharno<dcharno@comcast.net>  writes:
Its ashame. The goto syntax isn't easy on the eyes, but it was powerful
and allowed a reasonable workaround for standard patterns like
continue. But this "per function" limit really blows that; what a pity.

Hmm, no it doesn't, it just forces users to pick meaningful names
instead of just "muh, whatever, I'll just use ::continue::" -- in other
words, the result is probably _better_ than a simple "continue" in most
cases...

[If continue were the sort of thing that gets used _a lot_ maybe this
would be too high a burden.  But it's not.]

What's it to you if people want to "mindlessly" pick ::continue:: as
their label?  Pick a meaningful label for yourself.  What's it to you if
people use continue control structures?  Why is this so religious?