4 ms·
Pattern matching, strong typing with type inference and mutability by default are certainly not available in "acceptable" mainstream languages. Also OCaml is h
by rwmj 11y ago
Pattern matching, strong typing with type inference and mutability by default are certainly not available in "acceptable" mainstream languages. Also OCaml is highly productive, very fast to run, and you can just call down to C when you need to use a library.
- vog 11y ago> Also OCaml is highly productive More precisely, OCaml allows me to refactor my code very quickly, finding almost all mistakes even before any testsuite runs. This is possible due to a combination of language features which only few languages have (notably, Haskell, SML and F#). Not sure how this goes into total productivity, but this acceleration in development speed is something that no number of frameworks or libraries can match up.
- dfan 11y agoI didn't use OCaml for that long, but I still remember being astonished at how trivial it was to refactor in it.
- sytelus 11y agoProductivity gains by well tested vast number of libraries and frameworks far far outweigh gains due to language features such as pattern matching. Sure you can drop down to C from pretty much any language but most setups attempt to minimize that because maintaining hybrid language infrastructure (build/unit tests/upgrades/logging/auth etc) is typically expensive over long run. Also, may be calling libraries may be ok but using entire frameworks is much harder to use cross language.
- rwmj 11y agoExcept that it's easy to call down to C from OCaml so you precisely do not have to maintain that sort of infrastructure. OCaml also has a large number of native libraries of course.
- sklogic 11y agoImagine you have to write an optimising compiler for some exotic DSL, targeting a custom embedded platform. All the hipster "frameworks" and "vast number" of irrelevant shitty libraries won't help at all, while pattern matching alone will be extremely useful.
- ldrndll 11y ago> Productivity gains by well tested vast number of libraries and frameworks far far outweigh gains due to language features I see this argument all the time. I don't know if the type of software development I do is special (I doubt it, it's fairly standard business software), but the amount of time I spent on business logic dominates total development time. Past a certain fairly low threshold of core libraries (HTTP, JSON, CSV, database bindings, standard stuff like that), the amount of time libraries can save you is dwarfed by the cost of refactoring all that business logic. On the other hand, if the language is so niche as to lack the basics, you can find your entire development budget spent on building functionality other languages offer out the box. I don't think OCaml is that niche...