top | item 38361920

(no title)

SomeRndName11 | 2 years ago

You SML code is incorrect, shows that you actually never coded anything in SML. SML requires that "if" always contains "else" clause (which is the norm for many functional languages). And this kind of stuff which makes SML unnecessarily verbose (OCaml has for operators, single line let definitions that do not require you to make use val and fun for different type definitions etc.).

discuss

order

weatherlight|2 years ago

I did Programming Languages, Part A, (to learn FP semantics) many years ago. It doesn't show I never coded anything in SML, it shows I made a mistake :/ .I no longer have Standard ML on my machine.

I thought having the `let` keyword encompass `fun` and `val.` was needlessly confusing. It's not concise. if `let` can mean so many things why not just do what Haskell did.

Again.. it not "so much more verbose." which was the initial point.

but I concede, my SML code is in fact incorrect.

SomeRndName11|2 years ago

No SML is more verbose, is pretty obvious. A simple "for" in ocaml could save lots boilerplate doing trivial recurison.