home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / lang / c / 12478 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  3.5 KB

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