3 ms·
I don't think he's arguing that "http://example.com:80" http://example.com:80" and "http://example.com" http://example.com" should have different representation
by deathanatos 13y ago
I don't think he's arguing that "http://example.com:80" http://example.com:80" and "http://example.com" http://example.com" should have different representations: I (and I think he) agrees they should, but that the representation should be "example.com:80", in both cases. I'm not so sure about host, but having port sometimes be "" seems like it could catch people off guard. For host, you now need to watch out for the cases where the port is/isn't present. For port, when it's "".
To me, it's like the type of the variable. The variable "port" should contain the port, not (port|"").
- bzbarsky 13y agoAh, fair. The fact that port ends up as "" if it's default is almost certainly a "this is what most browsers do" kind of thing.