lua-users home
lua-l archive

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


> My wish for userdata environments is for them to allow nil as the  
> environment. That way I could easily tell whether or not I had set a  
> custom environment on a userdata.

But it would require an extra test for nil before any indexing. Can't
you use a fixed table with (or without) a distinguishing field that
you can inspect when you need to know whether there is a custom
environment?

-- Roberto