<story><title>Standard ML in 2020</title><url>https://notes.eatonphil.com/standard-ml-in-2020.html</url></story><parent_chain><item><author>hajile</author><text>StandardML really hits a nice sweet spot in language design.&lt;p&gt;The syntax is super-easy to learn (The BNF for the whole fits in a mere 2 pages[0]), but contains a lot of features in that small package. Rather than tacking on functional features (eg, Java with lambdas), these features have been carefully considered and streamlined and include bits like proper tail calls and currying.&lt;p&gt;You get nice bits like actually sound types (hindley-milner types as Milner was also one of the SML spec authors), generics (way better than typical interfaces), type inference that actually works, and modules (super-powerful encapsulation). Pattern matching in all it&amp;#x27;s awesomeness is also on display.&lt;p&gt;SML has an amazing concurrency story (CML is rather like golang channels, but better with better typing and a bit more flexibility) and compilers like PolyML or Mlton are very fast (once again, around the same as golang).&lt;p&gt;Despite this, the language &lt;i&gt;doesn&amp;#x27;t&lt;/i&gt; have the academic flaws of its descendants like Haskell.&lt;p&gt;SML isn&amp;#x27;t a lazy language, so reasoning about performance is much easier than some other functional languages. 
SML doesn&amp;#x27;t pretend the world is a pure function. You are free to make functions that have side effects.
While most primitives and data structures are immutable by default, they either have mutable variants (eg, vector and array) or can be used as if mutable with refs (something like typesafe pointers without all the reference&amp;#x2F;dereference bits).&lt;p&gt;[0] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;cse.buffalo.edu&amp;#x2F;~regan&amp;#x2F;cse305&amp;#x2F;MLBNF.pdf&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;cse.buffalo.edu&amp;#x2F;~regan&amp;#x2F;cse305&amp;#x2F;MLBNF.pdf&lt;/a&gt;</text></item></parent_chain><comment><author>jberryman</author><text>&amp;gt; doesn&amp;#x27;t pretend the world is a pure function.&lt;p&gt;At a first approximation, Haskell pretends the world is a piece of state, not a pure function.</text></comment>
<story><title>Standard ML in 2020</title><url>https://notes.eatonphil.com/standard-ml-in-2020.html</url></story><parent_chain><item><author>hajile</author><text>StandardML really hits a nice sweet spot in language design.&lt;p&gt;The syntax is super-easy to learn (The BNF for the whole fits in a mere 2 pages[0]), but contains a lot of features in that small package. Rather than tacking on functional features (eg, Java with lambdas), these features have been carefully considered and streamlined and include bits like proper tail calls and currying.&lt;p&gt;You get nice bits like actually sound types (hindley-milner types as Milner was also one of the SML spec authors), generics (way better than typical interfaces), type inference that actually works, and modules (super-powerful encapsulation). Pattern matching in all it&amp;#x27;s awesomeness is also on display.&lt;p&gt;SML has an amazing concurrency story (CML is rather like golang channels, but better with better typing and a bit more flexibility) and compilers like PolyML or Mlton are very fast (once again, around the same as golang).&lt;p&gt;Despite this, the language &lt;i&gt;doesn&amp;#x27;t&lt;/i&gt; have the academic flaws of its descendants like Haskell.&lt;p&gt;SML isn&amp;#x27;t a lazy language, so reasoning about performance is much easier than some other functional languages. 
SML doesn&amp;#x27;t pretend the world is a pure function. You are free to make functions that have side effects.
While most primitives and data structures are immutable by default, they either have mutable variants (eg, vector and array) or can be used as if mutable with refs (something like typesafe pointers without all the reference&amp;#x2F;dereference bits).&lt;p&gt;[0] &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;cse.buffalo.edu&amp;#x2F;~regan&amp;#x2F;cse305&amp;#x2F;MLBNF.pdf&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;cse.buffalo.edu&amp;#x2F;~regan&amp;#x2F;cse305&amp;#x2F;MLBNF.pdf&lt;/a&gt;</text></item></parent_chain><comment><author>skissane</author><text>&amp;gt; Despite this, the language doesn&amp;#x27;t have the academic flaws of its descendants like Haskell.&lt;p&gt;Can you elaborate on what those flaws are?</text></comment>