|
> Well, tables are mutable, so having metatables attached on an
> instance of a table makes sense. String are immutable, so I don't
> see the point for them...
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"? Does that depend on whether there is a GC between the
execution of those expressions? However you answer those questions,
there will be a lot of drawbacks.
-- Roberto