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

You're right that most of the time www.example.com and example.com are equivalent. But they aren't necessarily equivalent, which is why assuming they are identical is problematic.

Your suggested modification will be correct 99% of the time, but will be incapable of handling the other 1%. The current system is correct 50% of the time, and can correctly handle the 1% that the proposed modification cannot.

Philosophically the current solution seems to suggest it is better to be less correct on average but correctly handle edge-cases. As another consideration, the userbase can correct mistakes in the current algorithm, whereas they cannot correct mistakes in your proposed algorithm.



Can you provide an example when assuming no sub-domain is equivalent to 'www' is problematic?


Although few sites buck the tradition to have the www subdomain be handled identically to primary domain, it is not a requirement to do so. I don't have examples flowing out of my pocket, but it's just a DNS configuration away from reality.

You could also phrase this as the distinction between being "correct" and being "right". The current solution is "correct", although the proposed solution will typically be "right".


I wonder how many readers of HN are philosophically inclined rather than pragmatic?




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

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

Search: