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

  1. Newsgroups: comp.lang.misc
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!sgiblab!munnari.oz.au!mel.dit.csiro.au!mineng.dmpe.CSIRO.AU!dmssyd.syd.dms.CSIRO.AU!metro!usage!syacus!ian
  3. From: ian@syacus.acus.oz.au (Ian Joyner)
  4. Subject: Re: Pointers
  5. Message-ID: <1992Nov17.123841.28949@syacus.acus.oz.au>
  6. Organization: ACUS Australian Centre for Unisys Software, Sydney
  7. References: <721539019@sheol.UUCP> <BxLyv1.CG4@mentor.cc.purdue.edu> <721626972@sheol.UUCP> <BxpsHo.MID@mentor.cc.purdue.edu>
  8. Date: Tue, 17 Nov 1992 12:38:41 GMT
  9. Lines: 40
  10.  
  11. hrubin@mentor.cc.purdue.edu (Herman Rubin) writes:
  12. >There IS a way to get some of this, and I have been assured by those
  13. >who supposedly know that this can even be done, and at not too great
  14. >a cost.  That is to allow a really powerful macro language, which 
  15. >would be a syntactical translator from what the user wants to write
  16. >to what some processor can read.  
  17.  
  18. This is going back 30 years. There was a project at Cambridge (I think, or
  19. maybe Oxford) on a General Purpose MacroGenerator (GPM). This developed a
  20. language called CPL, which I gather was the forerunner of ideas that went
  21. into BCPL, then into B and into C. However, those who worked on this
  22. realised how much further they could push these ideas and took off more
  23. in the direction of HLLs. After all instructions in a language are just
  24. macros. But with a compiler you can achieve much more than just generate
  25. machine code. In fact generation of machine code becomes a somewhat
  26. secondary function compared to helping organise software, and automatically
  27. do proof checking on it. Chris Reade in his book "Elements of Functional
  28. Programming" has some good comments on these more important functions of
  29. languages and compilers.
  30.  
  31. P.S. I basically disagreed with your car analogies. I think the level of
  32. control over raw machine resources that you are advocating would be rather
  33. like braking a car by sticking your feet through the floor, rather like
  34. the Flintstones. Saying that a compiler writer is like a mechanic who
  35. does not know how a car works is the opposite of reality.
  36.  
  37. A compiler is actually more like the controls in a car. The pedals, steering
  38. wheel, and other controls in a car, 'compile' your intentions into something
  39. that the car understands. That is because the designer of a car understands
  40. how the car works, so that everyone who drives the car does not need to.
  41. A compiler writer in fact also has intimate understanding of the underlying
  42. machine, so that every programmer does not need to. However, if they are
  43. really interested, they can find out about this level. And when they
  44. really understand it, then they realise you don't need to know a lot
  45. about how hardware works, but that this *is* best left to a compiler.
  46. -- 
  47. Ian Joyner  ACUS (Australian Centre for Unisys Software)    ian@syacus.acus.oz
  48. "Where is the man with all the great directions?...You can't imagine it,
  49.  how hard it is to grow, Can you imagine the order of the universe?" ABWH
  50. Disclaimer:Opinions and comments are personal.
  51.