At 16.21 +0200 0-09-09, Koen Claessen wrote:
>Simon Peyton-Jones wrote:
>
> | So, taking a deep breath, we have instead at least
> | provisionally adopted Plan B, namely to build an
> | interactive system on top of GHC.
> :
> | We will lose some of Hugs's excellent portability
> | (compile these 10 C files and away you go).
>
>How about Hugs' *extremely* fast compilation time? (Which is
>the main reason for me (and many others) to use Hugs.)

I sit here trying to compile Hugs, and it is not going fast. :-) -- Hugs,
once compiled, has fast interpreter time, even though I understand it may
do some compilations internally. (Just joking.)

Given the complex manner in which GHC produces eventually runnable code, I
wonder how this could ever be turned into an interpreter.

It seems also better that GHC produces as output some object language code
that easily can be turned into a combination of C++ and Java the programmer
wishes for, rather than C. If one wants machine independent code in cases
when optimized speed isn't crucial, then one can translate it into JVM
(Java virtual machine) code. Java & C++ can also be combined, see for
example http://www.doc.ic.ac.uk/lab/cplus/.

Alternatively you can use your own byte-code, which I think you perhaps
already do, but then you have the problem of getting widespread
implementation of your HVM (Haskell VM): The JVM will be integrated into
MacOS X, and perhaps this will happen on other platforms as well. Perhaps
it is more efficient relying on these OS developer teams's platform
specific implementations rather than what you can do with your limited
manpower.

Anyway, I suspect that GCC isn't one of the more efficient compilers
around, so it would perhaps be better to weed out those GCC specialty
features and platform specific assembler code wizardry in the making of the
final object code output, because in the total equation, it perhaps is
perhaps not going to be faster than something that just passes over regular
C/C++/Java. The spinoff would be a higher degree of portability. Hugs runs
anywhere, but GHC just sits there. :-)

I realize that I will get a heap and a stack of experts trying to tell me
why I'm wrong, but come on, let's hear the truth. :-)

  Hans Aberg



Reply via email to