[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: list iteration for statement
- From: David Jeske <jeske@...>
- Date: Sun, 10 Jun 2001 22:39:51 -0700
On Mon, Jun 11, 2001 at 11:35:16AM +0900, John Belmonte wrote:
> > The vm already knows about lists. It builds them for var arg functions...
> Ah didn't see that, thanks for the correction.
> > Indeed very tricky when implemented with regular tables. The
> > question is, is it really necessary? With my semantic of the list loop
> > an 'n' field (or getn function) is not required. And the other "most
> > common use of n/getn" would be (I guess) tappend. And for that there
> > may be simpler optimizations.
> I think it's too useful to have nil's in a list. I couldn't see giving that
Yes, but that problem should be fixed for other reasons. IMO "false"
should be a distinct value from "nil" which can be set and stored in a
location. Booleans should evaluate to false, not "nil", and "nil"
(empty) should be treated as false in boolean comparisons.
For one reason why, read the section of my table inheritence technical
note about weaknesses due to Lua (IMO mistakenly) overloading nil with
both false and empty data.
David Jeske (N9LCA) + http://www.chat.net/~jeske/ + firstname.lastname@example.org