From mboxrd@z Thu Jan 1 00:00:00 1970 Mime-Version: 1.0 (Apple Message framework v746.2) In-Reply-To: <7744762da5d6e3361b0d1f3af6b3bd45@plan9.bell-labs.com> References: <7744762da5d6e3361b0d1f3af6b3bd45@plan9.bell-labs.com> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <00E03F87-8A6C-4DA6-8E7D-1800D4D27157@telus.net> Content-Transfer-Encoding: quoted-printable From: Paul Lalonde Subject: Re: [9fans] Function args not checked Date: Mon, 17 Apr 2006 08:40:51 -0700 To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Topicbox-Message-UUID: 37f2bff0-ead1-11e9-9d60-3106f5b1d025 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 17-Apr-06, at 8:31 AM, jmk@plan9.bell-labs.com wrote: > Prototypes are not documentation. Absolutely. But they have a better chance of reflecting reality. Not everyone is blessed to work on good code bases. Until then, I'll =20= keep "documenting" my prototypes with good names. Paul > > On Mon Apr 17 11:29:34 EDT 2006, leimy2k@gmail.com wrote: >> On 4/17/06, "Nils O. Sel=E5sdal" =20 >> wrote: >>> jmk@plan9.bell-labs.com wrote: >>>> As an aside, when you declare prototypes I find it is best to >>>> only give the types of the parameters and not declare identifiers, >>>> e.g. >>>> extern Elem mkoid(Ints *); // asn1.h >>>> rather than >>>> extern Elem mkoid(Ints *oid); // asn1.h >>>> This prevents confusion in environments where there is overuse >>>> of the pre-processor and the identifier gets substituted. >>> >>> Valid point,but I find the names quite helpful and of documentary >>> value - perhaps it's a defect of mine after reading too much >>> non-obvious code. >>> >> >> Well a lot of people fall back to header files for documentation >> purposes, and looking headers to figure out which of the "char =20 >> *'s" is >> a source and which is a destination in some cases is nice. >> >> Nothing that can't be solved with good comments and man pages though. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (Darwin) iD8DBQFEQ7cEpJeHo/Fbu1wRAnhfAKDFwmHNnIaZgveun50Tkqq43OuSBwCgmp6C +HRZ02LcjezPFri/8RrkuP0=3D =3Deds8 -----END PGP SIGNATURE-----