home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sun-barr!ames!agate!stanford.edu!rutgers!concert!sas!mozart.unx.sas.com!sasghm
- From: sasghm@theseus.unx.sas.com (Gary Merrill)
- Newsgroups: comp.lang.c
- Subject: Re: Pointer/address reluctance
- Message-ID: <Bt6K6q.36D@unx.sas.com>
- Date: 18 Aug 92 13:01:38 GMT
- References: <l8kteaINNp2c@exodus.Eng.Sun.COM> <1992Aug14.173255.10548@wyvern.twuug.com> <l8ojbqINN900@exodus.Eng.Sun.COM> <1992Aug17.155553.19704@vaxeline.ftp.com> <l906giINN4rl@exodus.Eng.Sun.COM>
- Sender: news@unx.sas.com (Noter of Newsworthy Events)
- Organization: SAS Institute Inc.
- Lines: 54
- Originator: sasghm@theseus.unx.sas.com
- Nntp-Posting-Host: theseus.unx.sas.com
-
-
- In article <l906giINN4rl@exodus.Eng.Sun.COM>, linden@positive.Eng.Sun.COM (Peter van der Linden) writes:
- |> From: clennox@vaxeline.ftp.com (Systems Anarchist)
- |> > You are perfectly free to redefine 'address' to mean 'pointer.'
- |>
- |> It's not a redefinition, as it is already used in the ANSI C standard
- |> with this meaning.
- |>
- |> There may well be archaic or unorthogonal hardware that defines "address"
- |> in some special, different, non-intuitive manner. The rest of computer
- |> science has known for some time that large, flat, byte-addressable address
- |> spaces are the way to go.
- |>
- |> This is not to criticize Steve who has clearly thought deeply about
- |> the matter, and come up with a paradigm that works for him. To me,
- |> the effort to avoid equating "address" and "pointer" is somewhat like
- |> trying to be more Catholic than the Pope. If the ANSI C std doesn't
- |> do it, why should anyone else?
-
- I really must protest one last time this view that the ANSI C standard
- equates "address" and "pointer". I you must persist in this view, that
- certainly is your right, but (as has been amply demonstrated by
- several postings) there is in fact nothing in the standard that asserts
- or implies such an equation. Most programmers lead perfectly happy
- lives without drawing the careful distinctions among syntax, semantics,
- and implementation that language designers and compiler writers must
- make. Most programmers have much more limited goals: get it to work
- (or at least get it to *appear* to work most of the time), or get it
- to work on this one machine (or on this one *type* of machine -- e.g.,
- having a flat address space). If identifying pointers and addresses
- serves your purpose, then by all means do this. But in that case it
- is better (certainly more accurate) to say "Well, as a practical
- matter I think of pointers as addresses," rather than insisting that
- "The standard says that pointers and addresses are the same."
-
- You can actually do a lot of practical mathematics without bothering
- to distinguish numbers from the names of numbers (numeric constants),
- or bothering to distinguish a vector from a letter with a little arrow
- drawn over it, but most mathematicians eventually will have to make such
- distinctions (if only, in the case of numbers, because there are so
- many more numbers than there are names for them). Similarly, *some*
- programmers will have to make the appropriate pointer/address distinction,
- and others will benefit from making it. The standard explicitly and
- intentionally allows this.
-
- In any event, your original question was for an explanation of why
- the "experts" make such a distinction. That has now been answered in
- great detail from a number of quarters. If you don't like the answer,
- ignore it.
-
- --
- Gary H. Merrill [Principal Systems Developer, C Compiler Development]
- SAS Institute Inc. / SAS Campus Dr. / Cary, NC 27513 / (919) 677-8000
- sasghm@theseus.unx.sas.com ... !mcnc!sas!sasghm
-