home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / misc / 3820 < prev    next >
Encoding:
Internet Message Format  |  1992-11-20  |  1.9 KB

  1. Path: sparky!uunet!olivea!gossip.pyramid.com!pyramid!moliver
  2. From: moliver@pyramid.com (Mike Oliver)
  3. Newsgroups: comp.lang.misc
  4. Subject: Re: Indirection
  5. Message-ID: <184367@pyramid.pyramid.com>
  6. Date: 20 Nov 92 19:24:40 GMT
  7. References: <Bxv2t2.4FH@mentor.cc.purdue.edu> <id.GT2V.7OE@ferranti.com> <Bxyut0.Jo@mentor.cc.purdue.edu>
  8. Sender: news@pyramid.pyramid.com
  9. Organization: Pyramid Technology
  10. Lines: 34
  11.  
  12. In article <Bxyut0.Jo@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  13. >                                                        As I understand it,
  14. >*x in C denotes the object referred to by x, the object "found" AT x.
  15.  
  16. Yes.
  17.  
  18. >                                                                       Thus,
  19. >@x would have been at least a somewhat logical notation, at least relatively
  20. >easily understood by users, as well as easy for parsing, etc.
  21.  
  22. But this flies in the face of hundreds of years of consistent usage of
  23. the @ symbol in retail trade, where it implies a multiplication (10
  24. items @ $3 each => $30).  This is precisely the sort of ambiguity I
  25. thought you wanted to avoid :-)
  26.  
  27. (Is it a coincidence that C uses the same symbol as its multiplication
  28. operator and as its dereference operator ?  Was Brian Kernighan an
  29. accountant in a past life ?  Followups to alt.conspiracy)
  30.  
  31. It's been suggested that C doesn't use the @ symbol (for anything at
  32. all) because it was the default line-kill character in early versions
  33. of Unix.  I've never managed to square this with the use of the #
  34. character to identify preprocessor directives, since # was the default
  35. character-erase character.  Maybe that's why the # has to be the first
  36. character on a preprocessor directive line.
  37.  
  38. I seem to recall that PL/M-86 and its descendants use the @ symbol as a
  39. address-of operator, the equivalent of C's unary &; this the exact
  40. opposite of your proposed usage.
  41.  
  42. Cheers, Mike.
  43.  
  44. moliver@pyramid.com
  45. {allegra,decwrl,hplabs,munnari,sun,utai,uunet}!pyramid!moliver
  46.