Good question :) Many reasons, I could make a blog post about it!
First, let me start with the biggest drawback of using OCaml: it might prevent potential contributors from making contributions. That is very sad!
However, OCaml is the language I know the most. I use it at work and I'm very very satisfied with it. It's main strengths for me are its type system for maintainability, the tools around it (the lsp server, the build system dune, the autoformatter ocamlformat, ...) and the fact that it can compiles to Javascript! It also has some libraries of very high quality.
With a "single" codebase, leveraging the javascript ecosystem, I could make the compiler work as a statically linked binary, as a node script published on npm, inside a Tauri app, and inside a VSCode plugin. ("single" codebase in quote since I needed some specific code for each application, but the core logic is shared.)
For sure, the same could have been made with another language, but I knew OCaml, and knew I would have a pleasant experience using it for that.
(I even plan to rewrite the engine in OCaml. The engine was written in javascript quite quickly, at a time when I had no experience with largish projects. It is now very difficult to maintain and extend.)
First, let me start with the biggest drawback of using OCaml: it might prevent potential contributors from making contributions. That is very sad!
However, OCaml is the language I know the most. I use it at work and I'm very very satisfied with it. It's main strengths for me are its type system for maintainability, the tools around it (the lsp server, the build system dune, the autoformatter ocamlformat, ...) and the fact that it can compiles to Javascript! It also has some libraries of very high quality.
With a "single" codebase, leveraging the javascript ecosystem, I could make the compiler work as a statically linked binary, as a node script published on npm, inside a Tauri app, and inside a VSCode plugin. ("single" codebase in quote since I needed some specific code for each application, but the core logic is shared.)
For sure, the same could have been made with another language, but I knew OCaml, and knew I would have a pleasant experience using it for that.
(I even plan to rewrite the engine in OCaml. The engine was written in javascript quite quickly, at a time when I had no experience with largish projects. It is now very difficult to maintain and extend.)