[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Empty? No. Array? No. Has? Yes.
- From: Sean Conner <sean@...>
- Date: Sat, 6 Jul 2013 20:09:04 -0400
It was thus said that the Great Jose Torre-Bueno once stated:
>
> On Jul 6, 2013, at 9:37 AM, Tim Hill <drtimhill@gmail.com> wrote: this
> entire model is to my mind elegant, cunning, and minimalist (all good
> qualities).
>
> I agree that the elegance is not to be lightly discarded. In this
> discussion I am not understanding what is wrong with using nan as a place
> holder to make a table have array like properties. To my mind another
> advantage of nan is that string.format will not choke on it the way it
> does on nil.
It does not, but what it does print is unexpected:
[spc]lucy:~/source/6809/simp>lua
Lua 5.1.5 Copyright (C) 1994-2012 Lua.org, PUC-Rio
> x = 0/0
> print(x)
nan
> print(string.format("one %d two",x))
one -2147483648 two
-spc (Honestly did not expect that)
- References:
- Re: Empty? No. Array? No. Has? Yes., Jay Carlson
- Re: Empty? No. Array? No. Has? Yes., Mark Hamburg
- Re: Empty? No. Array? No. Has? Yes., Andrew Starks
- Re: Empty? No. Array? No. Has? Yes., Tim Hill
- Re: Empty? No. Array? No. Has? Yes., Andrew Starks
- Re: Empty? No. Array? No. Has? Yes., Tim Hill
- Re: Empty? No. Array? No. Has? Yes., Andrew Starks
- Re: Empty? No. Array? No. Has? Yes., Rena
- Re: Empty? No. Array? No. Has? Yes., Jorge
- Re: Empty? No. Array? No. Has? Yes., Jose Torre-Bueno