3 ms·
Not the same thing, really, since domains are reversed compared to file paths. In domains, the root token is optional and assumed; like if 'home/user' meant the
by Cushman 14y ago
Not the same thing, really, since domains are reversed compared to file paths. In domains, the root token is optional and assumed; like if 'home/user' meant the same thing as '/home/user'.
- TazeTSchnitzel 14y agoWell, reverse the path then. "news.ycombinator.com." is equivalent to "/com/ycombinator/news", but more commonly we use "news.ycombinator.com", equivalent to "com/ycombinator/news". The root token is not optional and assumed at all. Instead, there are multiple "search paths", like with binaries on *nix and Windows/DOS. Now, usually, it will check "." ("/") somewhere along the way, but people often have intranet domains which are also checked, so what you expected to resolve to "news.ycombinator.com." might resolve to "news.ycombinator.com.mycompany.com."
- Cushman 14y agoThat's what the spec says. In practice, no one uses fully-qualified domains, and users who generally do not even know they exist rightly assume any domain name ending in a TLD should take them to the site indicated by that root, and it's surprising and confusing if it does not. Which is why it's pretty different from relative vs. absolute paths, which is a much-used and generally well-understood distinction.
- TazeTSchnitzel 14y agoThis is really going to blow up with the new gTLDs though, there is so much more room for conflict between root DNS and local DNS with so many more TLDs.
- Cushman 14y agoNot the only problem gTLDs are going to cause, either. I'm still hoping they pull the plug on the whole concept.
- kelnos 14y agoThat doesn't make sense. In filesystem-land /com/ycombinator/news is not equivalent to com/ycombinator/news. The latter depends on your current location in the filesystem, while the former does not. The search domains vs. search paths comparison is interesting, but I'd argue not equivalent either. Filesystem search paths only apply to binary executables, for one thing. On unix-like systems, at least, it is recommended that you do not have '.' in your search path. Regardless, there isn't really a "default" search path. If it's empty, you get nothing, and you'll be unable to execute anything without specifying a path. If your search domain list is empty, you still get the default, which is the root. I guess you can draw some parallels here and there, but it feels a bit forced to me.
- TazeTSchnitzel 14y agoSure, it's like both in some ways but also quite unlike both in other ways.