News for hackers. Stuff that matters.
Re:"It seemed like a good idea at the time": Berners-Lee 'so... by AndrewDucker on Wednesday October 14, 2009 @11:02AM (#881420)
You need the slashes. Otherwise how do you differentiate between: site:port/file (example.com:8080/myfile.htm) and protocol:site/file (http:example.com/myfile.htm) ? You could guess, based on where the full stops are, what's a numeric, etc. But you wouldn't be sure. Having dots for one separator, slashes for another and a double slash for the third makes it entirely clear where the breaks are.
Re:"It seemed like a good idea at the time": Berners-Lee 'so... by jpatte on Wednesday October 14, 2009 @11:14AM (#881449)
I guess one could have chosen another separator than ":" as port number prefix so there would be no ambiguity with the protocol suffix :)
Re:"It seemed like a good idea at the time": Berners-Lee 'so... by warwick on Wednesday October 14, 2009 @11:09AM (#881434)
It really doesn't. For example, try the URL http://paulgraham.com://articles.html
Re:"It seemed like a good idea at the time": Berners-Lee 'so... by mseebach on Wednesday October 14, 2009 @12:08PM (#881563)
Yeah it does. try this:

paulgraham.com://articles.html

The separators aren't to be matched globally, their order in the URL matters. The first // separates protocol from host. The second // isn't really - it's one slash to separate path from host, and the second slash is part of the path.

Re:"It seemed like a good idea at the time": Berners-Lee 'so... by xtho on Wednesday October 14, 2009 @01:26PM (#881730)
site:port/file could be considered illegal. A well-formed URL would be: protocol:site(:port)?(/path)?

where (...)? denotes optional parts.

Re:"It seemed like a good idea at the time": Berners-Lee 'so... by gord on Wednesday October 14, 2009 @07:06PM (#882337)
Ive seen some heinous regexen floating around to recognize urls/uris. Be nice if this hadn't have happened - but he gave us the web, right, we can hardly complain.
Re:"It seemed like a good idea at the time": Berners-Lee 'so... by varikin on Wednesday October 14, 2009 @11:45AM (#881515)
I thought he was referring to the http:// or ftp://. Without them it could be http:news.ycombinator.com or ftp:someserver.org.

Edit: Ok I reread your comment and understand it better. That could be a problem but there could be other solutions, but at the moment, I don't care to think them through.

Re:"It seemed like a good idea at the time": Berners-Lee 'so... by axod on Wednesday October 14, 2009 @12:34PM (#881622)
Check if the part between the : and (end or /) is an integer? Sure, some browsers allow you to specify an IP address as an integer, but I don't think that's extremely useful.