5 ms·
It seems like the colon is too ambiguous (is used as a protocol delimiter, delimiter for user/pass, delimiter for port). Reminds a little bit of Java labels wh
by leifg 5y ago
It seems like the colon is too ambiguous (is used as a protocol delimiter, delimiter for user/pass, delimiter for port).
Reminds a little bit of Java labels where you can do this:
public class Labels {
public static void main(String args[]){
https://hn.ycombinator.com
for(int i=0; i<10; i++){
System.out.println("......."+i );
}
}
}
the https: is a label named https and everything after the colon is a comment so this is valid code.
- jackewiehose 5y ago> It seems like the colon is too ambiguous (is used as a protocol delimiter, delimiter for user/pass, delimiter for port). and because that was still too boring they came up with ipv6
- deleted 5y ago[deleted]
- mananaysiempre 5y agoIIUC the IPv6 weirdness here is simply due to very unfortunate timing: IPv6 was being finalized at a time (first half of the 90s) when the Web (and with it URLs) was already nearly frozen but still not obviously important.
- chungy 5y agoThe colons also make IPv6 addresses unambiguous to IPv4 notation.
- gpvos 5y agoNot in URLs, but related: Larry's 1st Law of Language Redesign: Everyone wants the colon Larry's 2nd Law of Language Redesign: Larry gets the colon https://thelackthereof.org/Perl6_Colons https://thelackthereof.org/Perl6_Colons