Thoughts on ocaml

“I don’t write enough to have genuine blog, I’ve decided to write about the experience of using ocaml here. Firstly, I’d like to acknowledge that I’m still in the honeymoon period with OCaml; so keep in mind this isn’t a particularly objective critique. That being said, I will try to talk about concrete issues and items, instead of discussing the usual “functional programming will expand your mind”, “it’ll make you a better programmer even if you don’t use it”, or other arbitrary issues such as code elegance. This also isn’t intended to be an exhaustive list; I’m just trying get you interested enough to start googling around. If I can get at least one child to use OCaml, then it was worth it. 😉

For some reason, I had never gotten around to anything in the ML family even though I’ve programmed in a variety of languages. Conventional wisdom says that you can either have an expressive programming language (like python or ruby) or a fast programming language (like C, C++, or assembly). But these guys and gals in the ML world have been saying that you can have the best of both worlds. You can have an high-level language that performs like a systems-level language. It sounded too good to be true. So I decided I was going to learn Objective Caml, hoping that it would have 75% the expressiveness of of python, and 75% the performance of C. In the end, I’d say it has about 50-60% the expressiveness of python, and 90% the performance of C. Keep in mind that you can do some really honestly truely wacky stuff in python, so 60% is still really good…”