On Nov 10, 2004, at 4:34 AM, Graham wrote:
On 10 Nov 2004, at 8:20 am, Roy T. Fielding wrote:

Because that is what the proposal formerly said, before it was simplified
by removing that feature.

How is it a simplification? Let's code it (in Cocoa):

Do you seriously expect me to evaluate simplicity based on whether or not a system library function already exists in Cocoa?

Either:
NSURL *baseURL=[NSURL URLWithString:@"http://www.iana.org/assignments/relation/";];
NSURL *relationURL=[NSURL URLWithString:rel baseURL:baseURL];


vs

NSURL *relationURL;
if ([rel rangeOfString:@":"].location==NSNotFound) {
relURL=[NSURL URLWithString:[@"http://www.iana.org/assignments/relation/"; stringByAppendingString:rel]];
} else {
relURL=[NSURL URLWithString:rel];
}

Or you could just use the first one for both. Given that the base URI is slash-terminated, the result will be the same. Alternatively, I could just ask the Cocoa developers to add a catURI(base, rel) function if LOC is an issue.

OK, I get that there aren't any valid relative URI refs that aren't part of the registry, so I get your motivation for the change. It doesn't actually lead to a simplification of the spec or the code in any language that has URL classes.

It does in any code that is smart enough to just treat them as strings. Just because you have URL classes doesn't mean you have to use them.

....Roy



Reply via email to