Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Because of colons. Colons separate the different sections of an ipv6 address but HTTP URLs also use colons for the port, so the ipv6 IP must be encompassed in brackets to differentiate between IP and port.


If IPv6 had used dots instead, then addresses like "2001.db8.1.2.3.4.beef.de" would be ambiguous between an IP address and a hostname.

Perhaps they could've required every IPv6 address to use ".." exactly once for zero compression. Then you'd have "..2001.db8.1.2.3.4.beef.de", "2001.db8..beef.de", etc.

I guess the nullary ".." could go in the middle, but that would enshrine the /64 boundary into the addressing scheme, which seems like a leaky abstraction.


is there "no" to automatically append brackets? like we do with ctrl+enter?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: