Date: Mon, 21 Oct 1996 13:47:38 +0200 (MESZ) From: "Hr.Ladavac" <lada@ws2301.gud.siemens.co.at> To: michaelh@cet.co.jp Cc: phk@critter.tfs.com, jdp@polstra.com, bde@zeta.org.au, current@FreeBSD.org, wollman@lcs.mit.edu Subject: Re: <sys/queue.h> Message-ID: <199610211147.AA020798458@ws2301.gud.siemens.co.at> In-Reply-To: <Pine.SV4.3.93.961021200032.24461B-100000@parkplace.cet.co.jp> from "Michael Hancock" at Oct 21, 96 08:11:45 pm
next in thread | previous in thread | raw e-mail | index | archive | help
E-mail message from Michael Hancock contained: > > The original mixes up tag names and type names, which is a bogus thing to > do. > > Use typedefs for scalars such as dev_t and for complex objects that > combine arrays, pointers, structs, and functions. > > For simple structs, the typedef doesn't gain you much aside from not > having to type "struct". I have some strong feelings about that: namely, a typedef should be used for *any* type that is supposed to be opaque. If my program does not need to know whether something is a struct or a scalar or whatever, it *must not* know it either. This tends to make interface maintenance trivial (i.e. you have to recompile the interface consumers, but you don't need to patch their sources as well). MHO, naturally :) /Marino > > Regards, > > > Mike Hancock > > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610211147.AA020798458>