Hmmm, is this a common idiom? I must have programmed in 20 or so
languages and have never seen this, so am not surprised that Lua
doesn't support it.
Also, it doesn't exactly improve readability.
As an aside, assembly is pretty elegant Rena, it's just low level but
it's pretty straightforward to read and hardly ever confusing unless
done intentional.
On Sat, Jan 11, 2014 at 9:59 AM, Rena <hyperhacker@gmail.com
<mailto:hyperhacker@gmail.com>> wrote:
On 2014-01-11 12:58 PM, "Thiago L." <fakedme@gmail.com
<mailto:fakedme@gmail.com>> wrote:
>
> Why doesn't Lua have nameless labels or something?
>
> Would look somewhat like this:
> local s = "start"
> ::@::
> print s
> if s == "restart" then
> goto +
> end
> if s == "start" then
> s = "restart"
> goto -
> end
> ::@::
> print "end"
>
Because that looks hideous. This isn't assembly.