[prev in list] [next in list] [prev in thread] [next in thread] 

List:       lua-l
Subject:    Re: bug report: LUA compiler glitch
From:       Lorenzo Donati <lorenzodonatibz () interfree ! it>
Date:       2011-08-10 9:27:12
Message-ID: 4E424EF0.1040100 () interfree ! it
[Download RAW message or body]

On 10/08/2011 0.41, Mike Pall wrote:
> Lars Doelle wrote:
>>    The semantics of the composite assignment is inconsistent.
>
> Not a bug. Assignment order is explicitly undefined in Lua:
>
> http://lua-users.org/lists/lua-l/2006-06/msg00378.html

I was about to reply to the OP saying almost the same, but I wanted to 
double check and browsed the manual and didn't find any mention to it.

I tried to recall where I did learn that the order of assignment and 
evaluation were undefined, but to no avail (I've never read the message 
above and its related thread before - BTW thanks for the pointer), but 
I'm almost sure it was a lingering information (PiL?, WIKI?).

Anyway, IMHO, a sentence about that would be an useful addition to the 
manual (when I was a real newbie of Lua, when I first saw the multiple 
assignment statement I was induced to think that a precise order of 
evaluation was guaranteed).

>
> --Mike
>
>
>

-- Lorenzo

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic