[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: for i in *



Lo, on Sunday, May 20, Viktor Rosenfeld did write:

> Martin Fluch wrote:
> 
> > > Of course, some people argue, that spaces in filenames is a Bad
> > > Thing(tm), but I fail to see why.
> > 
> > Could exactly this be the reason, why spaces in filenames are considered
> > as a bad thing, since they easily lead into trouble?
> 
> But, this trouble is easily avoided with double quotes and on the flip
> side, spaces make things much more readable. 
> IMeanIt'SNotLikeWeDon'tUseSpacesInNormalWriting. 
> And-I-have-yet-to-see-somebody-who-replaces-all-spaces-with-dashes-or-dots. 
> See.what.I.mean?

Obviously you don't hang out with LISPers; using dashes to separate words
in long identifiers is a well-established standard in that community.  Many
of them, myself included, have also adapted this for filenames.

For example, in my .emacs file, I define a new function called
`rcc-bbdb-add-mail-record-p', manipulate a variable named
`bbdb-dwim-net-address-allow-redundancy', and so forth.  I think the most
complicated identifier (i.e., the one with the largest number of words),
would have to be `vm-auto-displayed-mime-content-type-exceptions'.

Easier to type than the corresponding C/C++ standard of using underscores
in really_long_identifiers, because you don't have to shift (at least on an
American keyboard).

In any case: you're quite correct, a little bit of care when writing shell
scripts and command lines will ensure that these files are processed
correctly.  There's a catch, though: while *you* may do the right thing,
how likely is everyone else?

Richard



Reply to: