[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: metatables for strings?
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 5 May 2015 11:35:14 -0500
On Tue, May 5, 2015 at 11:00 AM, Roberto Ierusalimschy
> More to the point, strings have no notion of "self", or of being
> created. If you run "a".."bc" twice, do you create two different
> strings (with two different metatables) or only one? Are they the
> same as "abc"?
and i love that "sense of selfless identity"!
what about non-interned strings? i think they are interned as soon as
it would make a difference, right? that would make them more like
'lazily interned, instead of distinctly non-interned...
I also like that lightuserdata values, as immutable values, also share
this trait... except that there aren't any operations to 'construct by
pieces' like strings, making them more like numbers... but without