(no title)
sweetsocks21 | 3 years ago
It's pretty comfortable for organizing and refactoring because of the nice module and type system. And once you grok Dune (the build system) you can get going pretty quick. Builds are very fast compared to most of the languages I use at work. And if you're not doing anything egregious the optimizing compiler (Flambda) can usually be within ~2x of C for most things. When it's not dropping down to C is very easy because the FFI system is very straight forward, and has built in support in Dune.
It is lacking a bit in libraries and when you need to drop down to imperative features you may find it a bit rough. For example not having a return keyword can make it annoying to port over libraries.
Overall I like it because I think the pros outweigh the cons, but I've also been using it for a decade so I'm probably getting set in my ways now. I'd say it's worth trying at least to understand Sum types (and maybe GADTs), and use a language with first class modules, it can change your approach to problems once you see some extra tools.
No comments yet.