lua-users home
lua-l archive

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


> Sometimes, you want to be able to enumerate all the functions
> in a table for documentation purposes - OK that's lame.

Not at all, it's actually a quite good reason, thanks. Sometimes I
miss parts of the big picture :)

> Maybe not being able to store new values is OK for these rotables, but
> other than that there should be no real differerences.

Maybe you're right, I should think more about this. The thing that I'd
really like to do is to have rotables be allowed as metatables for a
type (such a strings), this would allow for even more optimizations.
It seems to be hard to implement though.

> What about being able to define a ro metatable for a rotable?

I'm thinking to define a rotable as its own metatable by default (it
doesn't make much sense to set another rotable as its metatable, since
all this happens at compile time) and make it handle special methods
(at least __index). This should be fairly easy.

Thanks,
Bogdan