Subject: Re: Curious SYNOPSIS in signal(3)
To: Eric Jacoboni <email@example.com>
From: Greywolf <firstname.lastname@example.org>
Date: 06/26/2002 00:45:39
On 26 Jun 2002, Eric Jacoboni wrote:
# >>>>> "Greywolf" == Greywolf <email@example.com> writes:
# Greywolf> # it could be nice to add it in the synopsis as an
# Greywolf> alternative for the # basic syntax.
# Greywolf> How is typedef'ing it clearer than inlining it?
# Trust me: for some people, it is. I teach system programmation and i
# see every year that students prefer this notation.
Show me a student that wants to have the information hidden, and I'll
ask you if you want fries with that.
# Assuming a manpage is aimed to help to understand, not only for "the
# ones who already know", presenting this alternative is not a bad
# idea, from my point of vue...
I don't typically agree with data hiding. Cookies have always bugged
me, for example. There have been times where I have had to port code
and the target only received an opaque "thing" to deal with, and I
needed more information than what the routines which handled the cookie
were prepared to give me.
Seriously, they want to see "thing_t" as a representation for what's
happening? That's just obscurement, to me. If you don't understand
at least at a rudimentary level what a void (*thing)() is, you
probably should not be using one.
On the other hand, if you're using LOTS of void (*thing)()s, typedefs
are handy for avoiding typing (which is why I used them when I was in
school, too, outside of the obvious programmatical reasons).
Of course, that's (can_of_worms (*(*[MAXINT])())[MAXINT]) another;
NetBSD: We Come In Peace.