What does OCaml do better?

I love Rust, don’t get me wrong, but what does OCaml do better? Honest question.

Wow, that's a really broad question. There are large numbers of pluses and minuses between a functional, GC'd language and an imperative, non-GC'd language, and discussions comparing the two can be very lengthy. I suggest trying to narrow down the scope of your question if possible. For example, if you're trying to decide on a language for implementing a particular project, I think it would help to describe it and its requirements.

Sorry for the generality, I mean, which is best for which type of projects, and when are they a tie?

  1. Compile time

  2. REPL

  3. Metaprogramming

Programming languages aren't video game characters who's stats that can be evaluated on a simple chart. E.g., if someone says "Rust isn't good for GUIs", and then ten years from now someone writes the World's Best Gui (tm) in Rust, that person's comment just becomes wholly premature, doesn't it?

So pick the language you want to use and write the best software you can in it. The limitations that programming languages introduce are often social and procedural, and rarely technical. There's no reason to comparatively evaluate languages without the context of known requirements.

4 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.