Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Oct 1996 10:32:42 +0900 (JST)
From:      Michael Hancock <michaelh@cet.co.jp>
To:        John Polstra <jdp@polstra.com>
Cc:        bde@zeta.org.au, current@FreeBSD.org, phk@FreeBSD.org, wollman@lcs.mit.edu
Subject:   Re: <sys/queue.h>
Message-ID:  <Pine.SV4.3.93.961021100431.20316B-100000@parkplace.cet.co.jp>
In-Reply-To: <199610202112.OAA04687@austin.polstra.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 20 Oct 1996, John Polstra wrote:

> > >Don't do that, then.  It's horrid style anyway (IMAO), and you
> > >/certainly/ don't see any native Berkeley code doing that.  The style
> > >guide should discourage the practice if it doesn't already.
> > 
> > I agree.  Typedef should only be used for scalar types and function
> > types.
> 
> Why do you say that?  There's already precedent for using typedefs
> for structs in, for example, the "DIR" type of <dirent.h>.  And it
> is in line with C++ practice, where the struct, class, or union
> keyword is almost never used outside of the declaration.  (I know,
> this is C, not C++.  But the idea that the name of a type should
> not carry unnecessary information about its representation is a
> valid one.)

It's questionable to define a typedef just to save typing the word struct.
 
Regards,


Mike Hancock




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.SV4.3.93.961021100431.20316B-100000>