News for hackers. Stuff that matters.
Re:Two Years of OCaml by yawaramin on Tuesday May 02, 2023 @07:49AM (#35786113)
It's also worth noting that the author says that even with these 'deficiencies', OCaml is still far above everything else :-)
Re:Two Years of OCaml by IshKebab on Tuesday May 02, 2023 @01:10PM (#35790838)
They didn't actually go that far, but yes it's still better than many languages.

I would say Rust solves almost all of the issues identified in this post. It obviously introduces the extra complexity of no GC & borrow checking, but if you're ok with that I don't see why you would pick OCaml over Rust.

Re:Two Years of OCaml by deredede on Tuesday May 02, 2023 @05:23PM (#35794415)
The menhir parser generator is extremely good and doesn't quite have an equivalent in the Rust world.

But other than that, in no particular order:

- While it has its downsides, OCaml's module system (and functors especially) is extremely powerful and allows for all sorts of higher-kinded abstractions that are currently out of reach of Rust's type system, especially when combined with first-class modules

- No monorphisation means more reasonable compile times

- Some of the advanced type system features (GADTs, extensible types, polymorphic variants) are really quite nice

(but really, menhir is great, and I miss it whenever I need to parse things in another language)

Re:Two Years of OCaml by yawaramin on Wednesday May 03, 2023 @01:58AM (#35798545)
> They didn't actually go that far

Yes, they did. This is literally from the third paragraph of the article:

> It’s actually a weirdly optimistic thing: that a language with so many glaring deficiencies stands far above everything else.