While many functional/haskell paradigms don’t translate, there are a few techniques that JS can benefit from.
Why functional is better? So many reasons, one comes here: Programming languages are not made for computers, they are for humans to formulate generic solutions computers can solve faster in the details. The imperative style formulates the steps the computer has to follow, the functional style formulates the generic solution as such. Imperative style wants you to act like a machine, functional style allows you to think like a human.
Amen
Yhc Web Service is built around CouchDB which itself is written in Erlang. CouchDB uses JSON as encoding for queries and responses. A special daemon regularly polls the database for updates. If a new Haskell source is submitted for compilation as a new document, the daemon extracts it from the database, and invokes Yhc to transform it along with modules imported into linked Yhc Core. Next, Javascript Backend is invoked, to convert the linked Core into Javascript. Finally, using the XHTML template (user-supplied or standard), a Web page is built. Output from the compiler and other programs called during compilation is also collected. Results of compilation are stored in the database as attachments to the document which contains the submitted Haskell source.
tyb:
- http://www.amazon.com/Little-Schemer-Daniel-P-Friedman/dp/0262560992/ #Before Haskell, may be better to go with Sheme
- http://stackoverflow.com/questions/1012573/how-to-learn-haskell #Roadmap
- http://book.realworldhaskell.org/read/why-functional-programming-why-haskell.html #as…
Quick diff in a gist form. Hmm i don’t have nearly any experience in Haskell but it prefer Erlang form its just feels ok :).
