views:

1775

answers:

4

I've been reading about Ocaml's consistent speed, rapid prototyping ability, and excellent memory management, and decided to take it up.

As I've already got Ruby, *lisp, Haskell, and Erlang under my belt, I'm interested specifically in what KISS-violating features I should look out for in Ocaml.

If you've started Ocaml with a background in the above languages, what was the most frustrating thing to grok? How did you get around this difficulty? What analogies helped you get into the flow of the language?

I'd also be interested in knowing whether you have done more than simply learn Ocaml, and have actually converted to it for a large percentage of your coding problems.

+2  A: 

I found an excellent resource on Ocaml and its relation to most other languages: http://www.soton.ac.uk/~fangohr/software/ocamltutorial/lecture1.html

Not only does it explain the why, it also explains many of the little quirks likely to snag you as you begin.

Ah, I found a cheatsheet highlighting almost all of its syntactic weirdnesses.

pookleblinky
+1  A: 

There is a book about Ocaml "Practical Ocaml" it's not a really good book, but at least for getting started it's good enough. It's a quite practical language, which unfortunatly a "strange" syntax. If you like to see some "real" Ocaml then just look at the Shootout pages.

Regards Friedrich

Friedrich
A: 

Coming to OCaml from a C++ background, I found replacing classes with variant types to be the hardest transition (and it was easy!).

Cheers, Jon Harrop.

Jon Harrop
+4  A: 

I have heard the APress Practical OCaml is awful as well.

Introduction to Objective Caml is excellent and specifically addresses a few anti-KISS gotchas, such as ways the type-system can be unforgiving.

mbac32768