[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.2 #... proposal and patch.
- From: steve donovan <steve.j.donovan@...>
- Date: Tue, 10 May 2011 09:41:47 +0200
On Tue, May 10, 2011 at 9:03 AM, Dirk Laurie <dpl@sun.ac.za> wrote:
> In addition, if the language is Lua, try to start a debate on lua-l on
> how the language should be changed to make the feature less hazardous.
Hah, too true!
Avoid nils if you can, which is wise (especially if arrays are involved).
But nils have a way of finding you when you aren't prepared for them!
For example, a simple function sum(...) can be easily confused by
sum(a,b,c) where b happens to be undefined. The worst thing is to
silently calculate the wrong answer - you have to at least check that
select('#',...) is not greater than #{...} to know that you have not
been passed nils.
steve d.
- References:
- Re: Lua 5.2 #... proposal and patch., Benoit Germain
- Re: Lua 5.2 #... proposal and patch., Tony Finch
- Re: Lua 5.2 #... proposal and patch., Benoit Germain
- Re: Lua 5.2 #... proposal and patch., Tony Finch
- Re: Lua 5.2 #... proposal and patch., HyperHacker
- Re: Lua 5.2 #... proposal and patch., Henk Boom
- Re: Lua 5.2 #... proposal and patch., Eduardo Ochs
- Re: Lua 5.2 #... proposal and patch., Tim Mensch
- Re: Lua 5.2 #... proposal and patch., Luiz Henrique de Figueiredo
- Re: Lua 5.2 #... proposal and patch., Tim Mensch
- Re: Lua 5.2 #... proposal and patch., Dirk Laurie