Skip to content

Comment on Pain Points of OCamlparent

Comments

Your syntax complaints will never be well-justified. It’s just a syntax family you are unfamiliar with, not an actual downside. You can either put up with it or change language. The syntax is however in no way inferior to C style syntax because that’s what you are used to.

I think match statements should have an explicit `end` terminator or something so that you can nest them naturally. I think errors from accidental partial function application could be clearer. I think those two are pretty objective.

In terms of my subjective opinion the punctuation of C-style makes code hierarchy more clear, but at the cost of making it read less fluidly. I also think that `let...in` is weird and that Rust straddles a nice middle ground here by not having it but still having everything be an expression.

I like strict languages, and I like Rust for its strictness and robustness. I don’t like its standard library though, I wish it was more batteries included.

I think match statements should have an explicit `end` terminator or something so that you can nest them naturally.

It’s unneeded.

You can explicitly delimit any expression in Ocaml by using begin … end or parentheses. It works for everything including match statements which are expressions. So you are already free to use an explicit end statement if you are so inclined.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.