It's more of a design choice. I'm still not completely sold on it being a standalone Class. Java declares String as final, which is why the URI is completely separate. But if we have the chance to subclass String, it's worth considering. As it's been pointed out, the question now is: is an URI a String? or its unique formation sets it apart ?
It's clear that inheriting String methods offers no advantage, and the only other advantage is that it gets String treatment if you want to pass it along to other functions that expect one (think concatenation for example). On Wed, Mar 11, 2009 at 12:39 AM, Thomas Aylott < [email protected]> wrote: > > So, what are the pros/cons of it being a Class or a String subclass? > > btw, It it's a String subclass, then it should be String.URI. > > Why can't we have both a String.URI Native and a proper URI class? > String.URI could easily just use URI internally. > > —Thomas Aylott / subtleGradient > > > On Mar 10, 2009, at 7:07 PM, nutron wrote: > > Anyone else have any thoughts? >> > > -- Guillermo Rauch http://devthought.com
