<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>jonsterling</author><text>Nice post! There are a lot of good reasons to use OCaml over Haskell which are more compelling than “JavaScript”, though. A few of them are:&lt;p&gt;1. modularity (and now that they have added generative functors à la SML, you can have true abstraction)&lt;p&gt;2. benign effects: in Haskell &amp;quot;proper&amp;quot;, you do not have effects; rather you have &amp;quot;codes&amp;quot; for effects, which get interpreted into effects by the RTS; this rules out the possibility of, e.g., using effects to implement a semantically pure interface. On the other hand, OCaml has &lt;i&gt;actual&lt;/i&gt; effects, which can be used in an open-ended way to implement all sorts of functional interfaces.&lt;p&gt;3. strictness: arguments abound about whether laziness or strictness is better; for me, it comes down to the fact that with some pain, you can embed laziness in a strict language with effects, but you cannot embed full-on ML-style strictness into a language like Haskell; moreover, strictness-by-default permits &lt;i&gt;safe&lt;/i&gt; uses of benign effects.&lt;p&gt;I&amp;#x27;d call Haskell an expression-oriented programming language, since the types end up classifying expressions and algorithms (i.e. the particular &amp;quot;effects&amp;quot; you used get put into the type). Whereas I&amp;#x27;d say (OCa)ML is a value-oriented language, since values (canonical forms) are considered separately from general expressions (canonical and non-canonical forms); moreover, implementation details don&amp;#x27;t end up in the types, so you can really consider them to be classifying values and functions (i.e. equivalence classes of algorithms, not algorithms themselves). This is largely orthogonal from strictness vs laziness, but as soon as you add partiality in, strictness becomes the only tractable way to have canonical-form-based meaning explanations for the judgements of the theory.&lt;p&gt;P.S. My day job is writing Haskell. (In case the Pedagogical Brethren wish to come and &amp;quot;correct&amp;quot; me.)</text><parent_chain></parent_chain></comment><story><title>Why OCaml, why now? (2014)</title><url>https://spyder.wordpress.com/2014/03/16/why-ocaml-why-now/</url></story>
<instructions>Your goal is to analyze the following comment and estimate how highly it will be upvoted by the Hacker News community.</instructions><comment><author>didyoucheckthe</author><text>&amp;gt; The first question I usually get ... is “Why not Haskell?”.&lt;p&gt;&amp;gt; The answer is JavaScript.&lt;p&gt;My current favorite language for this is Elm[1]. It compiles to JS, is based on Haskell, and has a few simple differences between either[2].&lt;p&gt;Elm doesn&amp;#x27;t let you use the tons of available Haskell libraries, and makes it slightly painful to integrate with JS. But it&amp;#x27;s the coolest thing for the web so far. And here&amp;#x27;s why:&lt;p&gt;It uses a completely declarative state machine to model a fully interactive and complete GUI! This is the dream React.js and Om didn&amp;#x27;t even know they were heading towards! And yes, it is as good as it sounds.&lt;p&gt;[1]: &lt;a href=&quot;http://elm-lang.org/&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;elm-lang.org&amp;#x2F;&lt;/a&gt;&lt;p&gt;[2]: &lt;a href=&quot;http://elm-lang.org/learn/FAQ.elm&quot; rel=&quot;nofollow&quot;&gt;http:&amp;#x2F;&amp;#x2F;elm-lang.org&amp;#x2F;learn&amp;#x2F;FAQ.elm&lt;/a&gt;&lt;p&gt;EDIT:&lt;p&gt;Also, Elm fixed Haskell&amp;#x27;s awful syntax record name collision problem, and awesomely too!</text><parent_chain></parent_chain></comment><story><title>Why OCaml, why now? (2014)</title><url>https://spyder.wordpress.com/2014/03/16/why-ocaml-why-now/</url></story>