lua-users home
lua-l archive

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


On 3/2/06, Ryanne Thomas Dolan <rtdmr6@umr.edu> wrote:
>  I guess my wording was ambiguous.  Sorry if I confused anyone.
>
>  I did not mean to suggest that "" == 0 should evaluate true.  I posed the
> question "Would it make sense at all if "" == 0?" to suggest that if changes
> were made to Lua such that "" == false and 0 == false, then "" == 0 would be
> a logical consequence, which doesn't make any sense at all (to me).  Indeed,
> I think "" == 0 makes a lot less sense than false == nil, and I am very glad
> that neither expression is true in Lua.

Worse yet, given Lua's willingness to go between numbers and their
string representations, if 0==false, then it would be best to define
that "0"==false. (And that "0e-3" be false, although "0f-3" would be
true.) Yikes.

Ben