lua-users home
lua-l archive

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


In message <AANLkTikUeORjtec3wpz5l7jcgzVPDa2_A_CC6fm5g7m4@mail.gmail.com>
you wrote:

> On Sun, May 9, 2010 at 5:40 PM, liam mail <liam.list@googlemail.com> wrote:
> > I have always wanted assignment by addition operator += and company. I have
> > had a look at the mailing list archive yet can not see a reason for why the
> > language does not support it, can anybody shed any light?

> ........
> Because if you have that, you'd equally expect things like 'while (a++
> < 10) do ...' to work. However in Lua (unlike many other languages,
> particularly ones derived from C) expressions and statements are
> strictly separated.

There is also the fact that Lua expressions can return multiple values.
That is something that is hard to square with conflating expressions
and statements.

-- 
Gavin Wraith (gavin@wra1th.plus.com)
Home page: http://www.wra1th.plus.com/