Re: "file name" vs "filename"

2023-04-18 Thread Richard Kenner via Gcc
> A "file name" is the file's name.  It is a property of a file, like the
> inode or size.  The name exists (or not) regardless of whether we know
> what it is.  
> 
> A "filename" is a syntactic element, the thing itself, a string of
> characters.  It is supplied as input or rendered as output.  

For what it's worth, I agree.


Re: "file name" vs "filename"

2023-04-17 Thread James K. Lowden
On Sat, 15 Apr 2023 00:00:44 +0200 (CEST)
Gerald Pfeifer  wrote:

> On Mon, 2 Apr 2018, Joseph Myers wrote:
> > See the GNU Coding Standards:
> > 
> >   Please do not use the term ``pathname'' that is used in Unix
> >   documentation; use ``file name'' (two words) instead.  We use the
> > term ``path'' only for search paths, which are lists of directory
> > names.
> 
> Based on this it appears "file name" is the one to follow, so I went
> ahead and documented this at
> https://gcc.gnu.org/codingconventions.html with a patch at
> https://gcc.gnu.org/pipermail/gcc-cvs-wwwdocs/2023/010210.html .

May it please the court, I suggest there's a difference between
"filename" and "file name", and that the former should be preferred
because it's clearer.  

A "file name" is the file's name.  It is a property of a file, like the
inode or size.  The name exists (or not) regardless of whether we know
what it is.  

A "filename" is a syntactic element, the thing itself, a string of
characters.  It is supplied as input or rendered as output.  

One advantage to using "filename" when discussing syntax is that it is
unmistakably a single token.  Viz, 

-aux-info FILENAME
and
source files to create an output filename
and
The filename may be absolute

None of those examples is improved by substituting "file name".  At
best, the meaning is unchanged.  At worst, it's misleading.  

It's not obvious to me that the the distinction I'm drawing is
universally recognized.  At the same time, it's not obvious that the
gcc documentation would be improved by strict adherence to that
distinction, or by pedantically choosing to use one or the other. But,
if one is to be chosen for uniformity, "filename" is less apt to
confuse.  

--jkl





Re: "file name" vs "filename"

2023-04-14 Thread Gerald Pfeifer
On Sun, 1 Apr 2018, Sandra Loosemore wrote:
>> Our docs currently are about even and I think it would be good to
>> settle on one?
>> 
>>    % grep "filename" $GCC/gcc/doc/*.texi | wc -l
>>    92
>>    % grep "file name" $GCC/gcc/doc/*.texi | wc -l
>>    103
>> 
>> (Once we have consensus, I'll add that to codingconventions.html
>> and start by making the web pages consistent.)
>> 
> The C and C++ standards documents use "file name"; there are other places
> ("bit-field") where the GCC manual has adopted the C standard terminology.
> 
> In this case it might be more appropriate to adopt the POSIX conventions,
> since I suspect most of the uses in the GCC documentation refer to the host
> environment rather than the target language.  This looks like the POSIX
> glossary:
> 
> http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html
> 
> Here "filename" is given as the correct spelling, except that that glossary
> distinguishes between "filename" and "pathname" (a "filename" is the same as a
> "pathname component").  So perhaps many of the "file name"/"filename" uses in
> the GCC manual ought to be "pathname" instead?

On Mon, 2 Apr 2018, Joseph Myers wrote:
> See the GNU Coding Standards:
> 
>   Please do not use the term ``pathname'' that is used in Unix
>   documentation; use ``file name'' (two words) instead.  We use the term
>   ``path'' only for search paths, which are lists of directory names.

Based on this it appears "file name" is the one to follow, so I went ahead
and documented this at https://gcc.gnu.org/codingconventions.html with a 
patch at https://gcc.gnu.org/pipermail/gcc-cvs-wwwdocs/2023/010210.html .

Should we strive to use pathname (or path name) more broadly as Sandra
wondered? I'm a bit hesitant...

My next step is updating wwwdocs to consistently use "file name.

Thoughts?

Gerald


Re: "file name" vs "filename"

2018-04-06 Thread Vincent Lefevre
On 2018-04-02 12:11:33 +, Joseph Myers wrote:
> On Sun, 1 Apr 2018, Gerald Pfeifer wrote:
> 
> > And now to the most important question of all. ;-)  Should we use
> > "file name" or "filename" when referring to the name of a file?
> 
> See the GNU Coding Standards:
> 
>   Please do not use the term ``pathname'' that is used in Unix
>   documentation; use ``file name'' (two words) instead.  We use the term
>   ``path'' only for search paths, which are lists of directory names.

IMHO, "file name" is bad as it is ambiguous if its goal is to mean
either "filename" (in the POSIX sense) or "pathname". At least,
"filename" and "pathname" have been standardized by POSIX.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


Re: "file name" vs "filename"

2018-04-03 Thread Martin Sebor

On 04/01/2018 04:54 PM, Sandra Loosemore wrote:

On 04/01/2018 02:56 PM, Joel Sherrill wrote:



On Sun, Apr 1, 2018, 3:16 PM Gerald Pfeifer > wrote:

And now to the most important question of all. ;-)  Should we use
"file name" or "filename" when referring to the name of a file?

Our docs currently are about even and I think it would be good to
settle on one?

   % grep "filename" $GCC/gcc/doc/*.texi | wc -l
   92
   % grep "file name" $GCC/gcc/doc/*.texi | wc -l
   103

(Once we have consensus, I'll add that to codingconventions.html
and start by making the web pages consistent.)


Searching and looking at online dictionaries, it  looks like filename
is the currently preferred form.


The C and C++ standards documents use "file name"; there are other
places ("bit-field") where the GCC manual has adopted the C standard
terminology.

In this case it might be more appropriate to adopt the POSIX
conventions, since I suspect most of the uses in the GCC documentation
refer to the host environment rather than the target language.  This
looks like the POSIX glossary:

http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html

Here "filename" is given as the correct spelling, except that that
glossary distinguishes between "filename" and "pathname" (a "filename"
is the same as a "pathname component").  So perhaps many of the "file
name"/"filename" uses in the GCC manual ought to be "pathname" instead?


I don't have an opinion on how to spell it but I would like
to suggest that once a decision is made and the documentation
converges on the same spelling we make it a goal to also add
a script to enforce it.   That way it stays consistent and
authors as well as reviewers can focus on the substance of
our changes rather than on the minutia of which equivalent
form to choose.

Martin

PS Incidentally, also unlike C and C++, POSIX prefers
the hyphen in side-effect to the non-hyphenated form.


Re: "file name" vs "filename"

2018-04-01 Thread Sandra Loosemore

On 04/01/2018 02:56 PM, Joel Sherrill wrote:



On Sun, Apr 1, 2018, 3:16 PM Gerald Pfeifer > wrote:


And now to the most important question of all. ;-)  Should we use
"file name" or "filename" when referring to the name of a file?

Our docs currently are about even and I think it would be good to
settle on one?

   % grep "filename" $GCC/gcc/doc/*.texi | wc -l
   92
   % grep "file name" $GCC/gcc/doc/*.texi | wc -l
   103

(Once we have consensus, I'll add that to codingconventions.html
and start by making the web pages consistent.)


Searching and looking at online dictionaries, it  looks like filename is 
the currently preferred form.


The C and C++ standards documents use "file name"; there are other 
places ("bit-field") where the GCC manual has adopted the C standard 
terminology.


In this case it might be more appropriate to adopt the POSIX 
conventions, since I suspect most of the uses in the GCC documentation 
refer to the host environment rather than the target language.  This 
looks like the POSIX glossary:


http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html

Here "filename" is given as the correct spelling, except that that 
glossary distinguishes between "filename" and "pathname" (a "filename" 
is the same as a "pathname component").  So perhaps many of the "file 
name"/"filename" uses in the GCC manual ought to be "pathname" instead?


-Sandra


Re: "file name" vs "filename"

2018-04-01 Thread Joel Sherrill
On Sun, Apr 1, 2018, 3:16 PM Gerald Pfeifer  wrote:

> And now to the most important question of all. ;-)  Should we use
> "file name" or "filename" when referring to the name of a file?
>
> Our docs currently are about even and I think it would be good to
> settle on one?
>
>   % grep "filename" $GCC/gcc/doc/*.texi | wc -l
>   92
>   % grep "file name" $GCC/gcc/doc/*.texi | wc -l
>   103
>
> (Once we have consensus, I'll add that to codingconventions.html
> and start by making the web pages consistent.)


Searching and looking at online dictionaries, it  looks like filename is
the currently preferred form.

--joel

>
> Gerald
>