Article View: comp.lang.eiffel
Article #1196Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer
From: Kazimir Kylheku
Date: Sun, 24 Mar 1996 22:12
Date: Sun, 24 Mar 1996 22:12
36 lines
2630 bytes
2630 bytes
In article <3155786F.1262@iadfw.net>, Larry Weiss <lfw@iadfw.net> wrote: >Kazimir Kylheku wrote: > > Neither does the K&R2: this I think is a major flaw in the otherwise great > > book. It never makes clear the concept that the standard library is a component > > of the language. In fact, it claims the opposite: > > > > The standard library is not part of the C language proper, but an > > environment that supports standard C will provide the function > > declarations and type and macro definitions of this library. > > (beginning of Appendix B). > > > >That is a very interesting critique of K&R2. I'd like to hear other people's >comments on how to reconcile that text with the truth and still have as much >confidence as we do have in that book. Maybe "C language proper" can be just >thought of as a concept that K&R alone define, but I don't know if I'm willing >to cut them that much rope. I have utmost confidence in the book. There is a small list of well-known errors, most of which are in the programming examples (which an experienced user doesn't really look at, anyway). You can add to the critique the fact that K&R2 contains example implementations of standard defined functions, with external linkage. For example, it shows you how to write your own malloc(). In keeping with the idea that the library is a separate entity, it doesn't warn you that malloc is a reserved external symbol in a hosted environment. You can write your own malloc, but it had better be ``static''. Of course, the sample implementation is very useful to beginners who wish to understand how simple memory allocation works, but it should be rectified to carry appropriate caveats. How to reconcile this with the truth is to realize that the book was published very early; in 1988 in fact. This was before the crystallization of the ANSI standard which was in 1989, no? The book is a classic work, so it might as well be left alone, with its few minor warts and all. --
Technical Details
Message-ID:
<4j4hc5INNct5@keats.ugrad.cs.ubc.ca>Path:
arc1-ca.pugleaf.net!keats.ugrad.cs.ubc.ca!not-for-mailReferences:
<1995Jul3.034108.4193@rcmcon.com> <3154A548.71FF@iadfw.net> <4j3p80INN567@keats.ugrad.cs.ubc.ca> <3155786F.1262@iadfw.net>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!keats.ugrad.cs.ubc.ca!not-for-mail From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku) Newsgroups: comp.lang.eiffel,comp.lang.c,comp.lang.c++,comp.object,comp.software-eng Subject: Re: Beware of "C" Hackers -- A rebuttal to Bertrand Meyer Date: 24 Mar 1996 14:12:21 -0800 Organization: Computer Science, University of B.C., Vancouver, B.C., Canada Message-ID: <4j4hc5INNct5@keats.ugrad.cs.ubc.ca> References: <1995Jul3.034108.4193@rcmcon.com> <3154A548.71FF@iadfw.net> <4j3p80INN567@keats.ugrad.cs.ubc.ca> <3155786F.1262@iadfw.net> NNTP-Posting-Host: keats.ugrad.cs.ubc.ca