After we selected OCaml as the new language for 0install, I've been steadily converting the old Python code across. We now have more than 10,000 lines of OCaml, so I thought it's time to share what I've learnt.
OCaml is actually a pretty small language. Once you've read the short tutorials you know most of the language. However, I did skip one interesting feature during my first attempts:
There are also "polymorphic variants" which allow the same field name to be used in different structures, but I haven't tried using them.
I've since found a good use for these for handling command-line options...