Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxl!ihnp4!zehntel!hplabs!sri-unix!hartwell@Su-Shasta.ARPA From: hartwell@Su-Shasta.ARPA Newsgroups: net.unix-wizards Subject: Re: read(fd,&y,sizeof(y)) Message-ID: <189@sri-arpa.UUCP> Date: Wed, 21-Mar-84 16:44:00 EST Article-I.D.: sri-arpa.189 Posted: Wed Mar 21 16:44:00 1984 Date-Received: Sun, 25-Mar-84 08:12:20 EST Lines: 32 From: Steve Hartwell I think you should curb your dogma, Guy. I see a degree of cleanness in the basic datatype promotions from small ints to "generic" ints, and small floats to "generic" floats (that is, doubles) when passed as parameters, and I believe that that specification was made with the intention to aid in simplifying compiler implementation [ and not just because the architecture of the pdp11 demanded it, as suggested to me in a previous letter ]. And I see no reason why this concept should not be generalized to pointers as well. Passing a character as an argument to a function without an explicit cast is hardly reckless abandon; K&R say that chars are members of the int family and are treated that way. Why should passing a pointer be any more stringent? It seems so much more conceptually clean to me to say that a (foo *) is a member of the pointer family and give the compiler implementors (and program writers) a break. That is why I think that null pointers should be represented as NULL, whose definition is 0 *cast to a pointer to anything you like*; I don't believe that it should make a difference whether it is a (char *) 0 or a (struct _iob *)0. My view is that program control and data management is complex enough as it is, and if by clustering basic operative groups {ints, floats, pointers} can free me from cast slavery then I would argue for it. Fervent bible-thumping serves no purpose in a discussion which considers the merits and limitations of the standard(s); we /know/ what it SAYS; but you certainly hold no patent on its interpretation, or on what is worth cross-examining. Steve Hartwell, Stanford