lua-users home
lua-l archive

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


> 
> If I write
> 
> a,i = f(a),i+1
> 
> then I want i to get the value i+1 regardless whether f(a) 
> feels like returning two values or not.  And the same 
> reliable 1:1 relationship should hold when I use 
> comma-separated argument lists.
> 

Why would you write something like that knowing that f(a) could possibly
return multiple values?  If you want predictable behaviour then do
a = f(a)
i = i + 1

> Mapping a tail to a tail is still very much predictable.  But 
> a clearly expressed 1:1 relationship between explicit 
> function arguments and/or list elements should not be messed with.
> 

I'll take you're word for it.  

I'm bowing out of this discussion now, I'm still not convinced, but I
feel like I'm fighting a losing battle.  I'll just write it off as
another wierd "lua-ism" to warn the rest of my team about. :)
 








DISCLAIMER 
This email is sent by The Creative Assembly Limited company No. 03425917, registered in England &Wales registered office 27 Great West Road, Middlesex, TW8 9BW, England. The contents of this e-mail and any attachments are confidential to the intended recipient and may also be legally privileged. Unless you are the named addressee (or authorised to receive for the addressee) of this email you may not copy, disclose or distribute it to anyone else. If you have received this email in error, please notify us immediately by e-mail on postmaster@creative-assembly.co.uk and then delete the email and any copies. The Creative Assembly Limited have made all reasonable efforts to ensure that this e-mail and any attached documents or software are free from software viruses, but it is the recipient's responsibility to confirm this.