[Haskell-cafe] Picking an architecture for a Haskell web app

Neil Mitchell ndmitchell at gmail.com
Thu May 10 12:31:02 EDT 2007


Hi

> Wait a sec... Are you trying to tell me that it is *faster* to take the
> source, type check it, convert it to Core, perform 25,000 Core-to-Core
> transformations, convert Core to C, call GCC, link the result together,
> dynamically load it, execute it, extract the result and confirm that it
> type checks, and display it....... then it is to just directly execute
> an interpreted expression? I find that highly surprising.

No, you can do the GHCi trick, converting it to Core, perform a small
number of Core-to-Core transformations, convert it to bytecode,
interpret the bytecode. Compare this to the programmer time to
implement directly executing an interpetted expression, and it starts
to get complex.

Also remember that evaluating an expression in Haskell is _really_
hard! The value depends on the types, there is loads of sugar, loads
of libraries etc. A Haskell compiler is a very hard thing to write, an
interepretter doesn't save much of that complexity.

Thanks

Neil


More information about the Haskell-Cafe mailing list