home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.misc
- 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
- From: ian@syacus.acus.oz.au (Ian Joyner)
- Subject: Re: Pointers
- Message-ID: <1992Nov17.123841.28949@syacus.acus.oz.au>
- Organization: ACUS Australian Centre for Unisys Software, Sydney
- References: <721539019@sheol.UUCP> <BxLyv1.CG4@mentor.cc.purdue.edu> <721626972@sheol.UUCP> <BxpsHo.MID@mentor.cc.purdue.edu>
- Date: Tue, 17 Nov 1992 12:38:41 GMT
- Lines: 40
-
- hrubin@mentor.cc.purdue.edu (Herman Rubin) writes:
- >There IS a way to get some of this, and I have been assured by those
- >who supposedly know that this can even be done, and at not too great
- >a cost. That is to allow a really powerful macro language, which
- >would be a syntactical translator from what the user wants to write
- >to what some processor can read.
-
- This is going back 30 years. There was a project at Cambridge (I think, or
- maybe Oxford) on a General Purpose MacroGenerator (GPM). This developed a
- language called CPL, which I gather was the forerunner of ideas that went
- into BCPL, then into B and into C. However, those who worked on this
- realised how much further they could push these ideas and took off more
- in the direction of HLLs. After all instructions in a language are just
- macros. But with a compiler you can achieve much more than just generate
- machine code. In fact generation of machine code becomes a somewhat
- secondary function compared to helping organise software, and automatically
- do proof checking on it. Chris Reade in his book "Elements of Functional
- Programming" has some good comments on these more important functions of
- languages and compilers.
-
- P.S. I basically disagreed with your car analogies. I think the level of
- control over raw machine resources that you are advocating would be rather
- like braking a car by sticking your feet through the floor, rather like
- the Flintstones. Saying that a compiler writer is like a mechanic who
- does not know how a car works is the opposite of reality.
-
- A compiler is actually more like the controls in a car. The pedals, steering
- wheel, and other controls in a car, 'compile' your intentions into something
- that the car understands. That is because the designer of a car understands
- how the car works, so that everyone who drives the car does not need to.
- A compiler writer in fact also has intimate understanding of the underlying
- machine, so that every programmer does not need to. However, if they are
- really interested, they can find out about this level. And when they
- really understand it, then they realise you don't need to know a lot
- about how hardware works, but that this *is* best left to a compiler.
- --
- Ian Joyner ACUS (Australian Centre for Unisys Software) ian@syacus.acus.oz
- "Where is the man with all the great directions?...You can't imagine it,
- how hard it is to grow, Can you imagine the order of the universe?" ABWH
- Disclaimer:Opinions and comments are personal.
-