Obnoxious postings from Google Groups

Steven D'Aprano steve+comp.lang.python at pearwood.info
Wed Nov 7 09:15:07 CET 2012


On Wed, 07 Nov 2012 18:52:16 +1300, Gregory Ewing wrote:

> Steven D'Aprano wrote:
>> The downside is that if spaces are not argument separators, then you
>> need something else to be an argument separator. Or you need argument
>> delimiters. Or strings need to be quoted. Programming languages do
>> these things because they are designed to be correct. Shell do not
>> because they are designed for lazy users and merely aim to be "good
>> enough".
> 
> That's overly judgemental. 

Judgemental, sure. Overly judgemental? Not in my opinion.

Besides, to some degree, all progress depends on the lazy person. It's 
less work to have the computer do it than to do it yourself. 


> In the environment where shells originated,
> not being able to easily put spaces in file names wasn't considered a
> problem. File names weren't thought of as names in the natural language
> sense, but as identifiers in the programming sense.

What you say may be true, but the question is, *why* did they think this? 
The closest analogue to computer files are paper files, which have always 
been treated as names in the natural language sense, and spaces allowed.

"Miss Jones, fetch me the Acme Television Company file!"

sort of thing. And this is exactly why people want spaces in file names, 
and have to be trained or prevented from doing so. So why did early 
shells ignore the (implied) business requirement that files represent 
natural names and instead treat them as programming identifiers?

Because it was the easy thing to do.


> You don't complain that you can't put spaces in identifiers in a Python
> program, do you? 

I would if I could. But that would require the language to be... smarter? 
Less easy to use? *More* easy to use? It would require a major paradigm 
shift, and so I don't expect to treat identifiers as names, and use 
either CamelCase or names_with_underscores instead, even when the result 
is ugly.

But that's not a fixed law of nature. If Inform 7 can include spaces in 
identifiers, so could other languages.

http://www.ifwiki.org/index.php/Inform_7_for_Programmers/Part_1



-- 
Steven


More information about the Python-list mailing list