When comparing GHCJS vs PharoJS, the Slant community recommends GHCJS for most people. In the question“What are the best solutions to "The JavaScript Problem"?” GHCJS is ranked 8th while PharoJS is ranked 20th. The most important reason people chose GHCJS is:
With a Haskell backend, GHCJS enables code sharing. In combination with the power of Haskell as a language, this enables an extremely tight integration of the client side with the server side, where all the communications take place in a type-safe manner and even transparently if desired.
Ranked in these QuestionsQuestion Ranking
Pros
Pro Full Stack Code Sharing
With a Haskell backend, GHCJS enables code sharing. In combination with the power of Haskell as a language, this enables an extremely tight integration of the client side with the server side, where all the communications take place in a type-safe manner and even transparently if desired.
Pro All of Haskell, with the same tools you're used to
No need to learn new syntax or semantics, and no need to install and learn a bunch of new tools - it's just GHC.
Pro Mature language and community
Pro Terse
Haskell is a very terse language, particularly due to its type inference. This means there's nothing to distract from the intent of the code, making it very readable. This is in sharp contrast to languages like Java, where skimming code requires learning which details can be ignored. Haskell's terseness also lends itself to very clear inline examples in textbooks, and makes it a pleasure to read through code even on a cellphone screen.
Pro Quick Feedback
It's often said that, in Haskell, if it compiles, it works. This short feedback loop can speed up learning process, by making it clear exactly when and where mistakes are made.
Pro Program the web in Smalltalk
For people who enjoy programming in Smalltalk, Pharo allows developers to use Smalltalk for web development as well, since it transpiles Smalltalk code to JavaScript.
Pro Support for Phonegap to go directly to iOS/Android mobile App
Pro Compiles to very efficient Javascript, with almost perfect Smalltalk semantics
Pro Great IDE support
Pro Seamless integration with JavaScript libraries
Can directly call to / be called from JavaScript and can use foreign JavaScript objects.
Will soon have ability to generate and use AMD modules.
Cons
Con Large runtime
GHCJS supports the entire Haskell runtime, the Javascript it outputs tends to be quite large. This is in contrast to options such as Fay, which save some overhead by not supporting some features such as multi-threading.