Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!utfyzx!sq!msb From: msb@sq.UUCP Newsgroups: comp.lang.c Subject: Re: Creeping ADAisms in C Message-ID: <1987May5.134446.4174@sq.uucp> Date: Tue, 5-May-87 13:44:46 EDT Article-I.D.: sq.1987May5.134446.4174 Posted: Tue May 5 13:44:46 1987 Date-Received: Wed, 6-May-87 06:12:39 EDT References: <1535@umn-cs.UUCP> Reply-To: msb@sq.UUCP (Mark Brader) Organization: SoftQuad Inc., Toronto Lines: 39 Keywords: quit inventing jargon Checksum: 39601 This is a complaint about terminology in the Draft Standard: > A function prototype is a declaration of the TYPE of a function. So > why not call it a function declaration, and the place where you define > it, a function DEFINITION? Why introduce new jargon? To quote from section 3.1.2.1 of the Draft: "A function prototype is a declaration of a function that declares the types of its parameters." The new jargon is useful because it lets several sections say things like "the following behavior occurs if a prototype for the function is in scope". For instance, suppose NULL has one of the values* permitted in the Draft Standard, and setbuf() is the usual function; then if someone writes: setbuf (fp, NULL); then if setbuf() was DECLARED as: void setbuf(); the effect is implementation-dependent, but if it was declared with a PROTOTYPE, as: void setbuf (FILE *, char *); then the example does what was really wanted. Having the term "prototype" available lets this be stated more clearly. Personally, I have always found the terms "declaration" and "definition" confusing, but as they are well established, I wouldn't dream of asking for them to be changed. "Prototype" is a new term for a new thing, and both term and thing seem clearly a good idea to me. *an integral constant expression of value zero or such an expression case to type "void *". For instance, 0 or 0L or (void *)0. Mark Brader, utzoo!sq!msb C unions never strike!