lua-users home
lua-l archive

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


Not that anyone probably wants to change 5.1 at this point, but maybe the
answer to these issues is a way to override OP_SELF to better work with
basic types. That way, one could define default implementations for things
like:

    t:insert
    s:len
    t:len

Etc.

If you want the polymorphism, use the method dispatch form. If you want the
fast version, use the operator form.

Mark

on 8/3/05 3:18 PM, Rici Lake at lua@ricilake.net wrote:

> On 3-Aug-05, at 4:50 PM, Mark Hamburg wrote:
> 
>> I would buy that argument.
> 
> Me, too. But I'd also like to be able to use a metamethod to override
> #table. It seems odd that you cannot. (Not being able to override
> #string doesn't bother me at all.)
> 
> Rici
>