Effectively learning and making use of Ocaml

hey buddies, just need pieces of your advice, am a newbie to Ocaml, what could be an effective to learn Ocaml, is it learning a particular section and then hunting for problems about that particular subject or going through resorce first, i.e https://www.cs.cornell.edu/courses/cs3110/2019sp/textbook/, and then solve problems

1 Like

This is a really good question. I think that a good place to start might be books by Matthias Felleisen and Dan Friedman. They’ve mostly stuck to Scheme, but in truth, much of “FP nature” is transportable between functional languages. And in order to really program Ocaml well, one must be able to program in the purely-functional subset.

Perhaps the Little MLer (Friedman) might be a good book; certainly the Little Schemer and Little LISPer get excellent reviews.

I’ve never been a Matthias student, but I have great respect for his work to spread FP pedagogy, esp. at the high school level.

2 Likes

Hi @lubegasimon !

I think it depends of your own way of learning. I learn well with books, if you want here is a resource that I find really good: https://dev.realworldocaml.org/toc.html
But if you study ocaml in your school carrier, I would suggest to stick with your class resources which are likely to be tailored for you.

On “when do I learn and when do I practice”, I would practice along the way (sections after sections) to get familiar with the language at the beginning. Then I would go through the whole resources (because it is my style of learning) in order to have an idea of what to use when. Then, when implementing something, I could go back on the particular resource I came through and I need, to dig it.

Anyway, I think you have to find your style. Anyone needs both practice and theory, but some bend to some side, or prefer to start with one.

Enjoy your ocaml learning ! I hope you will feel the power it gives you.
Best !

1 Like

Much thanks @ruyblast, I was also thinking of this.

1 Like