From owner-freebsd-current Mon Oct 21 04:48:56 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id EAA08513 for current-outgoing; Mon, 21 Oct 1996 04:48:56 -0700 (PDT) Received: from zwei.siemens.at (zwei.siemens.at [193.81.246.12]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id EAA08501 for ; Mon, 21 Oct 1996 04:48:46 -0700 (PDT) Received: from sol1.gud.siemens.co.at (root@[10.1.143.100]) by zwei.siemens.at (8.7.5/8.7.3) with SMTP id NAA21029 for ; Mon, 21 Oct 1996 13:46:59 +0200 (MET DST) Received: from ws2301.gud.siemens.co.at by sol1.gud.siemens.co.at with smtp (Smail3.1.28.1 #7 for ) id m0vFIpx-00021FC; Mon, 21 Oct 96 13:48 MET DST Received: by ws2301.gud.siemens.co.at (1.37.109.16/1.37) id AA020798458; Mon, 21 Oct 1996 13:47:38 +0200 From: "Hr.Ladavac" Message-Id: <199610211147.AA020798458@ws2301.gud.siemens.co.at> Subject: Re: To: michaelh@cet.co.jp Date: Mon, 21 Oct 1996 13:47:38 +0200 (MESZ) Cc: phk@critter.tfs.com, jdp@polstra.com, bde@zeta.org.au, current@FreeBSD.org, wollman@lcs.mit.edu In-Reply-To: from "Michael Hancock" at Oct 21, 96 08:11:45 pm X-Mailer: ELM [version 2.4 PL24 ME8a] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org X-Loop: FreeBSD.org Precedence: bulk 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 > > >