lua-users home
lua-l archive

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


On Tue, May 5, 2015 at 11:00 AM, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
> 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
literal syntax...

-- 
Javier