lua-users home
lua-l archive

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

On Sun, May 3, 2015 at 8:32 AM, Nagaev Boris <> wrote:
On Sun, May 3, 2015 at 3:27 PM, Dirk Laurie <> wrote:
> I can't guess what you want.

I guess Sam wants strings to be like tables: each instance has
individual metatable.

Precisely, but not if we have to pay for it.

The string pointer has a metatable, so we can ("foo"):sub(1,1) and the like. 

It would be nice to be able to add to the metatable chain, so that values which
point to strings can have arbitrary methods, not only one set of privileged string functions. 



Best regards,
Boris Nagaev