Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Coming to Ocaml from Ruby, Lisp, Haskell, and Erlang [closed]

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.

like image 634
pookleblinky Avatar asked Feb 03 '23 13:02

pookleblinky


2 Answers

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.

like image 62
pookleblinky Avatar answered Feb 14 '23 08:02

pookleblinky


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.

like image 33
mbac32768 Avatar answered Feb 14 '23 10:02

mbac32768