okay actually I think POSIX filesystem paths and URLs should use different separator characters so people stop writing buggy code that assumes they're interchangeable. they are not interchangeable.

enthusiast enthusiast
offsite reposts: @nex3-reposts
clips & pics: @nex3-moments
Cohost utilities:
header photo by me
okay actually I think POSIX filesystem paths and URLs should use different separator characters so people stop writing buggy code that assumes they're interchangeable. they are not interchangeable.
i propose one uses / and the other uses .... wait hold up
what if we make one use /// so escaping the backslashes is going to be a horrible experience
Hm… how is the path component of a URL different from a filesystem path?
The big differences are:
\ is valid filesystem path separator. It is file:, which would just be treated as a relative path with a directory name if it were a filesystem path.: or #) are valid in filesystem paths (depending on OS) but not in URL paths.% escape codes, but filesystem paths may not.Okay I was taking 2 as obvious and not even worthy of consideration—the whole URL is different from the path. For 1, I don’t think that’s true in POSIX, I was considering Windows separately.
But 3 and 4 are very real and I’ve had to deal with them before and wasn’t thinking about them.
On some operating systems,
\is valid filesystem path separator. It is never a valid URL separator.
Actually it's valid according to WHATWG but not IETF which means browsers and non-browsers parse it differently :D
Classic MacOS used : as a path separator:
Macintosh HD:Stuff:thing.txt