Ok, I've caught up on this thread now and here's my thinking: 1) The current URI is not accurately named. It's only a URL manager, not a URI manager as it only handles urls. At the very least, we should consider renaming it.
2) The value for subclassing strings here, to me, is apparent. I want to be able to use URI (or URL if we rename it) to manipulate a string but then continue to do string things with it. Maybe I missed this in your debate, but my objective here is to be able to call other string methods on it (split, trim, whatever), concatenate it, and pass it to functions and even do things like assign it as the href of a link or throw it to window.location to load it. Yes, we could accomplish this with a class, but for some reason this seems less elegant because if I want to parse a URI, then transform it or use it in some way, and then manipulate it again I'll have to instantiate two instances of URI to do it (new URI(foo); foo += "bar"; new URI(foo) //again). 3) Before you argue that this class doesn't follow the design style of existing MooTools functionality, I'll point out that though I authored URI, Valerio was the one that suggested making it a subclass of String (and figured out the best way to do that) and Tom gave a ton of input as I refined it. 4) I don't know if a modular URI management system is in the scope of what this extensions is trying to be. It seems to me that we need to have this URL thing which is a subclass of string, but maybe a URI class that uses or extends it. I still think that we could easily subclass URI to allow us to subclass other types of strings (mailto for example) in the same manner. All that said, I'm not completely married to the current implementation. This release is a release candidate, so this kind of feedback is exactly the kind of thing we need. This is a great thread. I think I'll harass Valerio a bit to make him read it (and maybe Tom, too) and get some feedback from him. Aaron ----- The MooTools Tutorial: http://www.mootorial.com www.mootorial.com Clientcide: http://www.clientcide.com www.clientcide.com -- View this message in context: http://n2.nabble.com/Uri-class-tp2456119p2468860.html Sent from the MooTools Users mailing list archive at Nabble.com.
