[HN Gopher] OCaml Programming: Correct and Efficient and Beautiful
___________________________________________________________________
OCaml Programming: Correct and Efficient and Beautiful
Author : smartmic
Score : 43 points
Date : 2025-07-26 21:18 UTC (1 hours ago)
(HTM) web link (cs3110.github.io)
(TXT) w3m dump (cs3110.github.io)
| teiferer wrote:
| Could an OCaml expert give a quick take on the view that if FP,
| why not go all the way and do Haskell instead? I mean, if
| "correct, efficient, beautiful" are attributes of OCaml (and I
| know opinions differ, but let's assume for a moment..) then
| shouldn't they be attributes of Haskell too, maybe even more so
| in some ways?
| skybrian wrote:
| I'm not an OCaml or Haskell expert, but I expect that laziness
| makes performance harder to reason about?
| OneDeuxTriSeiGo wrote:
| At least theoretically they could be however OCaml is in large
| part driven by Jane Street and has been for some time now and
| Jane Street's entire business model is built around optimizing
| for ultra high throughput, ultra low latency software where
| mistakes could cost on the order of hundreds of billions of
| dollars.
|
| So my guess would be less that Haskell is not these things (nor
| couldn't it be) but rather that OCaml has had the external
| forces necessary to optimise for these things above all else.
| iLoveOncall wrote:
| There's absolutely nothing efficient nor beautiful about
| programming in OCaml.
| crvdgc wrote:
| Apart from being tied with Jane Street's libraries, _Real World
| OCaml_ is "deeper" in that it also talks about implementation
| details. This book has a more "introduction to functional
| programming via OCaml" vibe. Both are good textbooks with
| different emphases.
|
| The main author Michael Clarkson also started a similar lecture
| series on _Software Foundations_ using Rocq (Coq)[1]. Not sure if
| that 's still updated though.
|
| [1]: https://github.com/clarksmr/sf-lectures
___________________________________________________________________
(page generated 2025-07-26 23:00 UTC)