|Smallest Optimizer SAND_DUANE@tandem.com (1995-02-18)|
|Re: Smallest Optimizer email@example.com (1995-02-21)|
|Re: Smallest Optimizer firstname.lastname@example.org (1995-02-24)|
|Re: Smallest Optimizer email@example.com (1995-02-27)|
|Re: Smallest Optimizer geoffl@GS10.SP.cs.cmu.edu (Geoff Langdale) (1995-02-27)|
|Re: Smallest Optimizer Dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-03-04)|
|Re: Smallest Optimizer Dave@occl-cam.demon.co.uk (Dave Lloyd) (1995-03-11)|
|From:||Dave Lloyd <Dave@occl-cam.demon.co.uk>|
|Date:||Sat, 11 Mar 1995 13:23:52 GMT|
[I suppose, but in the absence of implementation pressure you end
up with Algol68. -John]
Best language in the world, mate! <g>
But seriously, a compiler-writer's job is to make the programmer's life as
easy, straight-forward and productive as possible. Why should a programmer
tolerate a badly designed language merely to make it easier to implement.
Arguments like this may have held ages back when it would take all of a
machine's capability to run a compiler, but now we have the case that most C
compilers are far too large to run on the machines that ran extremely competent
Algol 68 compilers (such as the RSRE or Uni. Cambridge implementations).
But worse, you assume that a well designed language is hard to implement and
hard to optimise for. Yet my impression of much of the discussion in this group
is of chasing the last few percent of register and instruction usage out of C
and FORTRAN programs simple because the compilers can not see enough to make
more dramatic optimisations. When everything has been expressed in such raw
implementation detail the compiler has to work hard to deduce the programmer's
intent (and this is particularly true with automated code generation from
macros and language to C processors). On the other hand, a language that lets
the programmer express what is meant allows the compiler to look for more
dramatic optimisations. If you like it is strategy versus tactics, good tactics
help you win a skirmish, but a good strategy wins the war and if you can only
see as far the next next hilltop, how can you plan your strategy?
I have my own agenda here of course. I write Algol 68 compilers! I also write
Fortran 90 compilers which provides the same high-level facilities but without
the regularity and that is where the problems start.
Allow me to conclude with some quotes from the Algol 68 Report:
Purpose: ``ALGOL 68 is designed to communicate algorithms, to
execute them efficiently on a variety of different computers, and to aid
in teaching them to students.''
Orthogonal design: ``The number of independent primitive concepts has been
minimized in order that the language be easy to describe, to learn and to
implement. On the other hand these concepts have been applied ``orthogonally''
in order to maximize the expressive power of the language while trying to avoid
Security: ``ALGOL 68 has been designed in such a way that most syntactical and
many other errors can be detected easily before they lead to calamitous
results. Furthermore, the opportunities for making such errors are greatly
Efficiency: ``ALGOL 68 allows the programmer to specify programs which can be
run efficiently on present-day computers and yet do not require sophisticated
and time-consuming optimization features of a compiler.''
A language must be easy to describe, otherwise the authors of the language are
in danger of making mistakes in its definition. A language must be easy to
learn, or else a gap will open up between the programmer's understanding and
what the program means to the compiler. And a language must be easy to
implement, or else the programmer will find conflicts between particular
compilers' treatment of a program and the defined meaning of the program.
Dave Lloyd Email: Dave@occl-cam.demon.co.uk
Oxford and Cambridge Compilers Ltd Phone: (44) 223 572074
55 Brampton Rd, Cambridge CB1 3HJ, UK
Return to the
Search the comp.compilers archives again.