Dear list members.
In my opinion, a compiler for a functional language should have the following
features:
1- It should be easy to install in the most common platforms. The installation
should be as easy as unpacking the compiler.
2- The compiler must be small. At most, 2 Megabytes. This should be enough
to house the compiler itself, a library for multimedia and action games,
library for creating GUIs, a library for fast numerical processing, with a
good
handling of matrices and vectors, a few action games as examples, etc.
3- It must be portable to the following platforms: MacIntosh, Windows,
Linux Red-Hat, Standard Linux, and Sun. Other platforms would be wellcome,
but these are the bare minimum. Windows is a must, since it is installed
in 80% of the microcomputers of the world.
4- The code generated must be fast. It must be at least as fast as unoptimized
C.
5- The compiler must be fast. It must be so fast that I do not need an
interpreter.
6- The code generated must be small, and use heap sparingly.
7- It must have dynamic types, and dynamic compilation.
However, if I do not need this feature, I should not be penalized
for its inclusion in the compiler.
8- It should be able to import libraries from other languages (Java, C,
Oberon,
Prolog). It should also be able to export libraries to languages like
LabView, MatLab, etc.
As far as I can see, only the Clean team is trying to construct a compiler
good enough to satisfy the above wish list. As far as I can see, their
compiler is
almost getting there. The compiler (with a complete multimedia library) is
about 2 M large. Without the multimedia library (but with a very good
graphic package), and without examples, Clean compiler takes 1 M.
The compilation is very fast; 30 seconds is enough to compile a large
action game, like Doom; the compilation of Weslesley's Musical Editor
(~10000 lines) takes 50 seconds in a pentium 250 MHz. The code is
about 50% faster than the code generated by SmallEiffel/LCC. Clean is
fully ported to Windows, run in a MacIntosh Box, and is partially ported
to Linux.
My question is: Why Haskell compiler makers do not try to catch with Clean
team, and surpass them? After all, there are many more people working
with Haskell than with Clean.
Ed Pereira
------------------------------------------------------------
This e-mail has been sent to you courtesy of OperaMail, as a free service from
Opera Software, makers of the award-winning Web Browser, Opera. Visit us at
http://www.opera.com/ or our portal at: http://www.myopera.com/ Your free e-mail
account is waiting at: http://www.operamail.com/
------------------------------------------------------------