3 ms·
I was working on a project in Fortran. I recommended OCaml, saying that it had all the same capabilities as Fortran (high performance, portability, compiling to
by ericlavigne 17y ago
I was working on a project in Fortran. I recommended OCaml, saying that it had all the same capabilities as Fortran (high performance, portability, compiling to native code, support for similar programming style) but also had additional features that would make me more productive. OCaml's position in language design space was perfect for a project in which a functional programmer would be doing most of the work, but a client felt more comfortable with something Fortran-like, in case he ever had to maintain it himself.
If I were making the decision completely on my own, I would prefer Haskell, but in-between languages like OCaml can make good compromise options. I also learned OCaml before Haskell, and consider it to have been a good stepping stone.
- silentbicycle 17y agoOCaml works well as a multiparadigm language. While it has some implementation quirks* , I like that its design doesn't force a pure functional approach. There's a quote in the French O'Reilly book, something like "Write your code in the style that is most natural, and give it a functional interface.". It seems like a good summary of the direction the language design points. (I just think there's a smaller, cleaner language buried inside OCaml...) Being "in between" can sometimes be a major strength. * In particular, adding typeclasses would nicely resolve several minor annoyances with the languags.