Re:State of Multicore OCaml [pdf]
by srean on Friday June 29, 2018 @07:11AM
(#17423778)
I don't program in OCaML or any ML for that matter, but what's so gnarly about the syntax ?
[ Parent
| on HN ]
Re:State of Multicore OCaml [pdf]
by tom_mellior on Friday June 29, 2018 @08:42AM
(#17424148)
One common critique is that in the toplevel (REPL) you must terminate your inputs by ;; and sometimes you will see code that puts ;; between function definitions too.
Also, nesting pattern matches is a bit ugly:
match x with
| Foo y ->
match y with
| Yes -> ok ()
| No -> not_ok ()
| Bar z -> whatever()
does not work, it must be: match x with
| Foo y ->
begin match y with
| Yes -> ok ()
| No -> not_ok ()
end
| Bar z -> whatever()
which is not a big deal but surprisingly easy to forget.Some people would also really like to write
let x = foo
let y = bar
x + y
but it has to be let x = foo in
let y = bar in
x + y
and those many "in"s accumulate.A bunch of these things look a lot cleaner in Haskell. Although it does it by being indentation-sensitive, which other people love hating.
Re:State of Multicore OCaml [pdf]
by jhwoodyatt on Friday June 29, 2018 @12:52PM
(#17425738)
Nobody really cares about programming language syntax as long as the grammar is reasonably sane and the semantics are clear. Which is the case with OCaml.
The other criticisms are the ones worth attending.