lua-users home
lua-l archive

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


>> Couldn't the same reasoning be applied here, and change 
>table lookups to
>> return nil if the table itself was nil? (But throw an error 
>when setting)
>> This would mean that heightmap[x][y] would return nil 
>instead of erroring,
>> and it would give somewhat more consistency.
>>
>
>Myself and several other people I know would do anything for this :)

How about:

debug.setmetatable( nil, { __index=function() end } )
print( NIL[nil] )


   Jörg