|
On 03/05/2015 17:32, Nagaev Boris wrote:
On Sun, May 3, 2015 at 3:27 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:I can't guess what you want.I guess Sam wants strings to be like tables: each instance has individual metatable.
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...
UrlString isn't a good type anyway, it should be Url (or Uri), like in Java, etc.As Tim said, just create a new type (ie. a table) and you are good to go, and probably more flexible (already split as scheme, port, etc.) perhaps with the cost of a little memory overhead.
-- Philippe Lhoste -- (near) Paris -- France -- http://Phi.Lho.free.fr -- -- -- -- -- -- -- -- -- -- -- -- -- --