[0/2] Document void *

Message ID 20201001150638.102544-1-colomar.6.4.3@gmail.com
Headers
Series Document void * |

Message

Alejandro Colomar Oct. 1, 2020, 3:06 p.m. UTC
  Hello Michael,

This type is very special,
so I will probably have missed some details about it.

Also, do you like the link name?

For anyone reading this, please comment :)

Cheers,

Alex

Alejandro Colomar (2):
  system_data_types.7: Add 'void *'
  void-*.3: New link to system_data_types(7)

 man3/void-*.3            |  1 +
 man7/system_data_types.7 | 42 ++++++++++++++++++++++++++++++++++++++--
 2 files changed, 41 insertions(+), 2 deletions(-)
 create mode 100644 man3/void-*.3
  

Comments

Michael Kerrisk \(man-pages\) Oct. 1, 2020, 3:34 p.m. UTC | #1
Hello Alex,

On 10/1/20 5:06 PM, Alejandro Colomar wrote:
> Hello Michael,
> 
> This type is very special,
> so I will probably have missed some details about it.

I do wonder if we actually need this in page at all, and given:

> Also, do you like the link name?

I really don't like it... I don't want to create files
whose names are globbing characters; that's a road to pain.

So, even if we did document this type in the page,
I don't think we can have a good link name. (I suppose we
could add it to the pagewithout having a link.)

Thanks,

Michael
  
Alejandro Colomar Oct. 1, 2020, 3:40 p.m. UTC | #2
Hi Michael,

On 2020-10-01 17:34, Michael Kerrisk (man-pages) wrote:
> Hello Alex,
> 
> On 10/1/20 5:06 PM, Alejandro Colomar wrote:
>> Hello Michael,
>>
>> This type is very special,
>> so I will probably have missed some details about it.
> 
> I do wonder if we actually need this in page at all, and given:


I think it should be.
I would also document 'void', even if it's a bit weird...
They are very useful, so why not document them?

> 
>> Also, do you like the link name?
> 
> I really don't like it... I don't want to create files
> whose names are globbing characters; that's a road to pain.


Yeah, me neither... :)

> 
> So, even if we did document this type in the page,
> I don't think we can have a good link name. (I suppose we
> could add it to the pagewithout having a link.)


But maybe we can have a link void.3.

> 
> Thanks,
> 
> Michael
> 


Thanks,

Alex
  
Jonathan Wakely Oct. 2, 2020, 1:19 p.m. UTC | #3
On Thu, 1 Oct 2020 at 16:51, Alejandro Colomar via Gcc <gcc@gcc.gnu.org> wrote:
>
> Hi Michael,
>
> On 2020-10-01 17:34, Michael Kerrisk (man-pages) wrote:
> > Hello Alex,
> >
> > On 10/1/20 5:06 PM, Alejandro Colomar wrote:
> >> Hello Michael,
> >>
> >> This type is very special,
> >> so I will probably have missed some details about it.
> >
> > I do wonder if we actually need this in page at all, and given:
>
>
> I think it should be.
> I would also document 'void', even if it's a bit weird...
> They are very useful, so why not document them?

Because the man-pages are not a tutorial for the C language.

"The Linux man-pages project documents the Linux kernel and C library
interfaces that are employed by user-space programs."

void and void* are not APIs.
  
Michael Kerrisk \(man-pages\) Oct. 3, 2020, 11:44 a.m. UTC | #4
Hi Jonathan!

On 10/2/20 3:19 PM, Jonathan Wakely wrote:
> On Thu, 1 Oct 2020 at 16:51, Alejandro Colomar via Gcc <gcc@gcc.gnu.org> wrote:
>>
>> Hi Michael,
>>
>> On 2020-10-01 17:34, Michael Kerrisk (man-pages) wrote:
>>> Hello Alex,
>>>
>>> On 10/1/20 5:06 PM, Alejandro Colomar wrote:
>>>> Hello Michael,
>>>>
>>>> This type is very special,
>>>> so I will probably have missed some details about it.
>>>
>>> I do wonder if we actually need this in page at all, and given:
>>
>>
>> I think it should be.
>> I would also document 'void', even if it's a bit weird...
>> They are very useful, so why not document them?
> 
> Because the man-pages are not a tutorial for the C language.
> 
> "The Linux man-pages project documents the Linux kernel and C library
> interfaces that are employed by user-space programs."
> 
> void and void* are not APIs.

Agreed, but the rationale of the page is to document topics
that are helpful when using the APIs. And, as I noted already
stuff like 'void *' is borerline, but I think it's helpful
to have some info summarized in one place. And, additionally,
POSIX adds a detail to the C standard (casting between
void * and function pointer).

By the way, thanks for all of your input so far. Among
other things, it made me realize that some navigational
corrections were needed.

Cheers,

Michael