lua-users home
lua-l archive

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


> On Feb 21, 2017, at 1:18 AM, Francisco Olarte <folarte@peoplecall.com> wrote:
> 
> Hi Tim:
> 
> On Tue, Feb 21, 2017 at 8:26 AM, Tim Hill <drtimhill@gmail.com> wrote:
> 
> IMO raw or normal access does not play. In fact I introduced an
> example with a metamethod using a callable object, on normal (
> raw==unraw access ). The thing is once you have accessed the
> metamethod for __add ( ithout invoking others ) yout have to call the
> value you got, but the access is over. Or not, if you define access
> other way, but it does have nothing to do with rawnes.
> 

Yes, and of course I quoted the wrong part of the manual (see my later post and correction to Dirk). In fact, I cannot really see any reason why __call should not handle callable either; its not really recursion, its more closer to the chaining that __index do. And of course in both cases it’s possible to setup cycles of metatables that will crash the VM.

However, I agree with your main point; this difference doesn’t seem to be made clear in the ref manual, so at the least it would be nice if this were updated to make this difference more clear.

—Tim