lua-users home
lua-l archive

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


Hi,

I am looking forward to new version of Lua very much because it
fantastically enhaces the embeddability (and usefulness) of the
language. However, I wonder whether it will be possible (and
efective) to use it to implement specific kind of object-oriented
system:

Let's say I have thousands of objects in my application
and I would like to create individual environment (or state)
for each object, so that objects cannot interfere between
each other. I am afraid it might not effective to have so
many environments. Or was the new version developed
exactly with this point in mind (I mean that the authors
assumed the new version to be used this way)?

Also, I am trying to make up some kind of technique which
would allow one environment to access some Lua variable
in another environment. I've been thinking of a system of
pointers managed from C. Also, it would require reference
counting mechanism and special tags marking some
variables as "foreign". Does anyone have a better solution?

Regards,

Martin