OCaml Syntax Sucks

OCaml’s “let … = … in …” syntax is confusing and difficult to understand, especially when nested. The language lacks clear indicators of scope, leading to global and local declarations having the same syntax. Function definitions further add to the confusion. In contrast, ML, from which OCaml originates, uses “end” to demarcate expressions, providing clearer structure but requiring more typing. Despite the challenges, OCaml’s syntax has a unique lineage from ISWIM to ML to Caml and finally OCaml. alternatives like lisp or C-syntax exist, with Facebook creating Reason, which presents OCaml in JavaScript syntax. The history behind OCaml’s syntax reveals its oddball nature, influenced by a desire to be a universal language.

http://xahlee.info/comp/ocaml_let_syntax.html

To top