←back to thread

Learn OCaml

(ocaml-sf.org)
203 points smartmic | 2 comments | | HN request time: 0.558s | source
Show context
uncircle ◴[] No.44403407[source]
When I first looked at OCaml 15 years ago, it felt so complex and couldn’t wrap my head around it.

Now after almost a decade with Elixir, used to functional patterns and immutable data access, I followed a course on compiler construction in OCaml [1] and it felt surprising easy and straight forward, while my attempts using regular imperative languages feel like I’m wasting time on bureaucracy and boilerplate (i.e. in C, Rust or Python) - pattern matching is such an amazing feature.

1: https://cs3110.github.io/textbook/cover.html

replies(2): >>44403585 #>>44408426 #
1. mejutoco ◴[] No.44403585[source]
Not trying to deny your experience, but Rust also has match.

https://doc.rust-lang.org/rust-by-example/flow_control/match...

replies(1): >>44452856 #
2. uncircle ◴[] No.44452856[source]
It's really not as ergonomic as Ocaml/Elixir.