5 ms·
Setting up an OCaml build system for the first time is an absolute nightmare. There are a number of tooling issues with OCaml that require a lot of work to figu
by discardable_dan 6y ago
Setting up an OCaml build system for the first time is an absolute nightmare. There are a number of tooling issues with OCaml that require a lot of work to figure out and work around. It is not batteries-included, either.
Once set up, though, I agree that it drives very much forward. In compiler writing in particular, it allows you to express the things you care about (ASTs and transformations over them) with next to no effort.
- jasone 6y agoA few years ago this was still true, but since then Dune (originally called jbuilder) has dramatically changed the ease with which OCaml projects can be set up. As for batteries included, there are several options for foundational libraries; I found there to be too many choices rather than too few when I first started developing in OCaml.
- throwaway894345 6y agoMaybe things have progressed in the intervening years, but I found dune/jbuilder to be complicated and poorly documented. I've forgotten many of the issues I had with it, but IIRC there were a couple of different configuration formats (S-expressions and something else?) and the examples online never worked out of the box. As for foundational libraries, I agree that there were too many choices, but IMO fragmentation in the standard library is a bad thing (you need to know how to interop between them as you integrate third party libraries that use different standard libraries). Never mind the confusion that creates for newbies. Moreover, for newbies, getting editor integration working well, understanding the unfamiliar (to put it nicely) syntax, and a myriad of other challenges without good documentation are other significant obstacles. These are pretty significant downsides, and as much as I like the upside of a nice type system, I don't need it to build a product, but I need good tooling and a good ecosystem and a healthy supply of developers. I can ship a product with Go or Python (languages with impoverished type systems)--there might be more bugs but finding and fixing bugs is manageable--but OCaml presents significant challenges.