home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / misc / 3701 < prev    next >
Encoding:
Text File  |  1992-11-15  |  2.5 KB  |  47 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!ornl!rsg1.er.usgs.gov!darwin.sura.net!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!hrubin
  3. From: hrubin@mentor.cc.purdue.edu (Herman Rubin)
  4. Subject: Re: Accessing the hardware directly (Was: Pointers)
  5. Message-ID: <BxsCMz.Mu1@mentor.cc.purdue.edu>
  6. Organization: Purdue University Statistics Department
  7. References: <mwm.2n3n@contessa.palo-alto.ca.us> <BxrK6x.A04@mentor.cc.purdue.edu> <92Nov15.195430est.47880@neat.cs.toronto.edu>
  8. Date: Mon, 16 Nov 1992 01:40:10 GMT
  9. Lines: 36
  10.  
  11. In article <92Nov15.195430est.47880@neat.cs.toronto.edu> tlai@cs.toronto.edu (Tony Wen Hsun Lai) writes:
  12. >In article <BxrK6x.A04@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  13. >[stuff deleted]
  14. >>I do not see how any system of references will enable writing
  15.  
  16. >>    *fill(*descriptor)
  17.  
  18. >>any faster.  Nor do I trust compiler writers (or government bureaucrats.)
  19. >>And if the lack of pointers in the languages causes hardware to elide pointers
  20. >>in favor of something clumsy like call_by_name, searching the name file, we
  21. >>all lose.  I have also pointed out that I want to use this in cases in which
  22. >>the calling routine does not even know the name.  True, you could read the
  23. >>name, but is that any easier than reading the address?
  24.  
  25. >I guess you don't like pass by reference?  Pass by reference is almost
  26. >inevitably implemented using pointers, but doesn't involve _explicit_
  27. >pointers set up by the programmer.  You may not need or appreciate
  28. >abstractions for your programming, but if you look at the evolution of
  29. >language design, abstractions are important for designing and writing very
  30. >large, maintainable programs.
  31.  
  32. What is my notation other than calling the function by an indirect reference,
  33. and passing the argument similarly?  Now I can put the argument reference on
  34. the stack by first reading it into a register and then putting that register
  35. on the stack, but what is gained by that?  And if the machine does not have
  36. a reasonable way to call a function by indirect reference, the only way that
  37. it could be done is by placing the address in the code for the function call
  38. at run time, and this, or any other, modification of code at run time is,
  39. I believe, considered quite objectionable.  Fortran calls only by reference,
  40. and has finally come around to realizing that indirect references (pointers)
  41. can improve the situation.
  42. -- 
  43. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  44. Phone: (317)494-6054
  45. hrubin@snap.stat.purdue.edu (Internet, bitnet)  
  46. {purdue,pur-ee}!snap.stat!hrubin(UUCP)
  47.