lua-users home
lua-l archive

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

Axel> It fails the data structures part. Nil cannot be stored in data
Axel> structures, except in "argument stacks" or how you might call it.

local vector = { x = 5, y = 3, z = nil }
print(vector.x, vector.y, vector.z) -- 5	3	nil
vector.x = nil
print(vector.x, vector.y, vector.z) -- nil	3	nil

nil is actually <<stored>> in vector.x (moreover, very efficiently ^^).

Axel> Instead I've activated the "make-nil-a-first-class-value-crowd"
Axel> which we knew preexisted

So I'm in the "nil-is-already-a-first-class-value-crowd" if it exists :)
(I'm not against the non-nilness, but nil just works fine for me)

Regards, Julien