
On 20 September 2010 04:50, Marc Weber
Excerpts from Nils Schweinsberg's message of Sun Sep 19 18:50:39 +0200 2010:
By the way, did anyone use javascript on their websites? I wonder if there are any nice ways to combine those two worlds?
Haskell:
- http://github.com/sviperll/ghcjs (There is work in progress): JS backend for GHC. You have to find a way to compile the base packages. It was originally written for ghc-6.8.2
- YHC (york haskell compiler) has a JS backend
- of course those DSL's you can find on hackage
My guess is that Haskells laziness adds both: a runtime penalty and a code size penalty. I don't have proofs for that.
I've been thinking maybe a nicer route is to have a DSL which generates JavaScript or jQuery or some higher-level JS library. We don't need to compile *Haskell* code to JavaScript, I don't think -- we can merely have a good declarative description language in something like Applicative or an Arrow. I haven't tried it yet but I'll let you know how that goes.