The biggest issue is consistency.
Nothing else in MooTools subclasses String.
This is More and not Core, so the rules aren't as hard and fast.
But I don't think I want to recommend that people subclass string.

It all boils down to who is going to write all the specs and maintain this thing into the future.
I'm not going to, so I don't get a real vote.

All I really need it to do is handle the stuff I want. I'd rather not have to use toString() on it if I don't have to. If I don't have to do that with a normal Class, then what's the point of it being a string subclass?

—Thomas Aylott / subtleGradient

On Mar 10, 2009, at 11:12 PM, Sebastian Markbåge wrote:

About concatenation. I just added a test for that. new Uri('...') +
'string' and 'string' + new Uri('...') both work as expected. So
assuming it is two strings being concatenated it will work anyway. You
can also use it to test a regexp: (/^...$/).test(new Uri('...'))

So I guess we're down to whether or not the String-manipulation
methods such as substr, replace etc. are needed. And that boils down
to whether or not a URI is a String?

Reply via email to