not 0 evaluates to true

Sep 30, 2014 at 10:14 PM
> print(not 0)
as opposed to Lua:
$ lua
Lua 5.2.3  Copyright (C) 1994-2013, PUC-Rio
> = not 0
Oct 1, 2014 at 8:21 AM
This is really unlogic for me?
All none nil values evaluate to true...
Oct 1, 2014 at 5:58 PM
Edited Oct 1, 2014 at 5:58 PM
0 seems to evaluate to false in NeoLua, though; whereas Lua forces nil/false to be the only false values.
Oct 1, 2014 at 7:21 PM
For me this is natural, because I have always the bits in mind. And Lua is the first language, were 0 is true. That confuses me, and I have to test and rewrite the logic emitter.

But, I am getting the idea behind ... it is hard to abstract this to .net, because .net is closer to the cpu.
Oct 4, 2014 at 2:53 PM
not 0
is false, now.