3 ms·
Ocaml isn't whitespace sensitive (other than in the obvious sense, i.e., to separate tokens). You can write a whole module (or series of modules) on a single
by gmfawcett 9y ago
Ocaml isn't whitespace sensitive (other than in the obvious sense, i.e., to separate tokens). You can write a whole module (or series of modules) on a single line if you want to.
- marcosdumay 9y agoYou can write a whole module in a single line of Haskell too. That's not the correct thing to test.
- gmfawcett 9y agoReally? How do you put multiple "import" statements on a single line in Haskell? Or a function signature followed by its definition? Ocaml uses whitespace (including newlines) for exactly one reason: token separation. Indentation and line breaks are arbitrary, and can be replaced with spaces in any sequence of Ocaml statements. The same cannot be said for Haskell.
- dragonwriter 9y ago> Really? How do you put multiple "import" statements on a single line in Haskell? With semicolons and curly braces; Haskell's newline/indent syntax is merely an aesthetic substitute for those.