lua-users home
lua-l archive

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


> If you don't mind adding a pair of parenthesis (or quotes) to the end
> of the expression, you can get something pretty nice with __call :

It is a good idea to use __call as a final table access indeed ! In that way it is easy to catch the last access to the path, and then call an appropriate getter internally.
Your implementation seems to generate a lot of intermediary object though), but that may be optimized, using week tables so that at least it gets collected when unnecessary.