Text-mode apps (Was :Who are the "spacists"?)

Steve D'Aprano steve+python at pearwood.info
Sat Apr 1 13:09:44 EDT 2017


On Sun, 2 Apr 2017 02:43 am, Marko Rauhamaa wrote:

> Steve D'Aprano <steve+python at pearwood.info>:
> 
>> Open your eyes, there is a whole world past the borders of your insular,
>> close-minded little country. 95% of the world is not American, and there
>> are millions of Americans who want to use non-ASCII characters in their
>> file names, even non-Latin characters.
> 
> It would be nice to be able to use a / in my file names. 

Yes it would. Obviously the solution is to use colons as the path separator,
like in Classic Mac OS (and a few others).

And then, as sure as water is wet, you'll complain that you want to use : in
your file names.

*Whatever* record separator you choose to use, whether it is slash / or
backslash \ or colon : or Ctrl-^ RS or U+113A HANGUL CHOSEONG SIOS-PHIEUPH,
you can't *also* use it as a non-record separator.

I suppose one might invent an escaping scheme, so that you can escape the
record separator, and another escaping scheme so you can escape the escape
and prevent it from escaping the record separator. That would work.

But it's complex and error prone and people will get it wrong, and the
people who designed the Unix file system didn't think the extra complexity
was worth the benefit. If you disagree, feel free to design your own file
system, and if people prefer yours, they'll use it.

Its not just Unix. As far as I know, *no* file system, from any operating
system, has bothered to introduce an escape character so that file names
can include the path record separator. Not Unix, not Windows, not OS X, not
classic Mac OS, not Solaris.



-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.




More information about the Python-list mailing list