All of lore.kernel.org
 help / color / mirror / Atom feed
* Consistent parameter names
@ 2021-03-04 14:50 Alejandro Colomar (man-pages)
  2021-05-21 22:19 ` Ping: " Alejandro Colomar (man-pages)
  0 siblings, 1 reply; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-03-04 14:50 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: linux-man

Hello Michael,

I found different terms for parameters that refer to a same thing
in different functions (usually a '[const] char *'):
	 - filename
	 - file
	 - path
	 - pathname
	 - Maybe others; I don't know

For 'FILE *' we have more or less the same,
although this one is much more consistent (>90% use 'stream'):
	 - stream
	 - streamp
	 - s
	 - fp
	 - file
	 - filehandle
	 - A few others in specific cases

Also for strings, there are
	- s
	- str
	- string
	- maybe others

There are probably other cases with the same problem.
I think these parameters should have a more consistent naming.
But which names should we use?

I tend to use short names such as fname, fd, s, ...
but I don't know if you may prefer longer names for documentation purposes.

What would you do about it?

Thanks,

Alex

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Ping: Consistent parameter names
  2021-03-04 14:50 Consistent parameter names Alejandro Colomar (man-pages)
@ 2021-05-21 22:19 ` Alejandro Colomar (man-pages)
  0 siblings, 0 replies; 2+ messages in thread
From: Alejandro Colomar (man-pages) @ 2021-05-21 22:19 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages); +Cc: linux-man

Ping.

On 3/4/21 3:50 PM, Alejandro Colomar (man-pages) wrote:
> Hello Michael,
> 
> I found different terms for parameters that refer to a same thing
> in different functions (usually a '[const] char *'):
>      - filename
>      - file
>      - path
>      - pathname
>      - Maybe others; I don't know
> 
> For 'FILE *' we have more or less the same,
> although this one is much more consistent (>90% use 'stream'):
>      - stream
>      - streamp
>      - s
>      - fp
>      - file
>      - filehandle
>      - A few others in specific cases
> 
> Also for strings, there are
>     - s
>     - str
>     - string
>     - maybe others
> 
> There are probably other cases with the same problem.
> I think these parameters should have a more consistent naming.
> But which names should we use?
> 
> I tend to use short names such as fname, fd, s, ...
> but I don't know if you may prefer longer names for documentation purposes.
> 
> What would you do about it?
> 
> Thanks,
> 
> Alex
> 

-- 
Alejandro Colomar
Linux man-pages comaintainer; https://www.kernel.org/doc/man-pages/
http://www.alejandro-colomar.es/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-05-21 22:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-04 14:50 Consistent parameter names Alejandro Colomar (man-pages)
2021-05-21 22:19 ` Ping: " Alejandro Colomar (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.