home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / misc / 3575 < prev    next >
Encoding:
Text File  |  1992-11-10  |  2.0 KB  |  39 lines

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!ukma!darwin.sura.net!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
  3. From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  4. Subject: Re: Pointers
  5. Message-ID: <BxIoDv.72J@mentor.cc.purdue.edu>
  6. Sender: news@mentor.cc.purdue.edu (USENET News)
  7. Organization: Purdue University Statistics Department
  8. References: <1992Nov7.115620.29967@syacus.acus.oz.au> <1992Nov10.024021.8724@linus.mitre.org> <92Nov10.125426est.47525@neat.cs.toronto.edu>
  9. Date: Tue, 10 Nov 1992 20:17:54 GMT
  10. Lines: 27
  11.  
  12. In article <92Nov10.125426est.47525@neat.cs.toronto.edu> tlai@cs.toronto.edu (Tony Wen Hsun Lai) writes:
  13. >In article <1992Nov10.024021.8724@linus.mitre.org> crawford@boole.mitre.org (Randy Crawford) writes:
  14. >[stuff deleted]
  15. >>Remember too, that when C was born in 1969, most programmers were still 
  16. >>fighting with 300 baud modems, paper tape, and columnar punch cards.  A terse 
  17. >>powerful programming language like C, with user-defined types, dynamic memory 
  18. >>and free-form syntax was a huge step forward.  In a lot of ways, more modern 
  19. >>languages are still trying to catch up.  It was 1992 before Ada 9X offered us 
  20. >>pointers to functions.  But two decades ago they were available in C.
  21.  
  22. >ALGOL 68 and SIMULA 67 have user-defined types, dynamic memory, and
  23. >free-form syntax, no?  And why do you need explicit pointers to functions
  24. >when you can have procedure types, like Modula-2?
  25.  
  26. You need explicit pointers to functions when the caller does not know
  27. the name of the function being called, but the caller has received a
  28. pointer to the function.  The same holds for pointers to arrays of
  29. pointers, and to array descriptors.  If several parts of a program
  30. are using the same double buffer, and are even compiled separately,
  31. using a pointer to the active buffer, and another one to the refill
  32. buffer, would be an excellent way to do things.
  33.  
  34. -- 
  35. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  36. Phone: (317)494-6054
  37. hrubin@snap.stat.purdue.edu (Internet, bitnet)  
  38. {purdue,pur-ee}!snap.stat!hrubin(UUCP)
  39.