aaws11
Joined 4 years ago
Joined 4 years ago
https://pastebin.com/raw/dTGJS3Se
is there a threadreader equivalent for mastodon?
Also, OCaml has no tracking of side-effects (like in Haskell), and the language and the standard library have lots of features and functions with mutation, such as the array update syntax, mutable record fields, Hashtbl, and the regex module.
The only thing that makes OCaml more “functional” than e.g. Dart, Java, or Rust is that it supports tail calls. While having tail calls is important for functional programming, I would happily give up on tail calls if that means not having the problems listed above.
When you mix imperative and functional styles tail calls become less important. For example, I don’t have to implement a stream map function in Dart with a tail call to map the rest of the stream, I can just use a while or for loop.
In my opinion there is no reason to use OCaml in a new project in 2023.
For clarity, I mean here a basic engine (for example, a custom engine for a 2D game), not a photorealistic and generic 3D game engine like Unity (that definitely is very difficult and probably not worth reinventing the wheel without a good reason).