
Teaching OCaml - lelf
http://ocaml.org/learn/teaching-ocaml.html
======
atestu
I'm surprised EPITA (France) is not on the school list. OCaml is the first
language you learn there. Fantastic introduction to algorithms.

~~~
bibinou
you can add it, here's the link to the file on Github :
[https://github.com/ocaml/ocaml.org/blob/cd7186176a11c860ef35...](https://github.com/ocaml/ocaml.org/blob/cd7186176a11c860ef3579ebaf326194935d8d4b/site/learn/teaching-
ocaml.md)

~~~
amirmc
Is there a reason you're pointing to a specific commit? The link below is to
the current version.

Also note that it's easy to make quick edits in GitHub's web interface
_without_ having to clone the repo locally. It works well and we get a lot of
quick fixes this way.

[https://github.com/ocaml/ocaml.org/blob/master/site/learn/te...](https://github.com/ocaml/ocaml.org/blob/master/site/learn/teaching-
ocaml.md)

~~~
bibinou
I don't link to branches because if the file gets moved (which it very
frequent especially for doc), the link goes 404.

Think of it as a use-after-free :)

Blobs are mostly immuable and you have to edit in a fork anyway, unless you
have rights to the repo.

------
tsax
So many functional languages. Which one to learn? Haskell? OCaml? F#? Scheme?
Common Lisp? Clojure?

~~~
dragonwriter
Learn more than one. I would suggest, in no particular order, at least one
from each of these three groups:

Static, strict-by-default ML derivatives (Standard ML, F#, Ocaml, AliceML,
etc.)

Static, lazy-by-default ML-inspired (Haskell, probably others, but, really,
Haskell).

Dynamic Lisp-family languages (Racket, Scheme, Common Lisp, Clojure)

~~~
pjmlp
I would add a Logic Programming language like Prolog to the list.

~~~
cheepin
Isn't Prolog considered a "declarative" language?

~~~
pjmlp
Yes, but it complements functional programming.

Plus it helps to understand how those logic programming libraries, like mini-
Kanren, core.logic among others work.

------
derekchiang
1 would like to recommend the lecture notes [1] used in CS3110 at Cornell to
people who want to learn OCaml. They have been used and revised over the years
and are of very high quality.

[1]
[http://www.cs.cornell.edu/Courses/cs3110/2014sp/lecture_note...](http://www.cs.cornell.edu/Courses/cs3110/2014sp/lecture_notes.php)

------
AceJohnny2
In the "suggested textbooks" section, #3 is Real World OCaml which has Jason
Hickey as an author and is available for free online, and #4 is Jason Hickey's
notes for a course, is marked "Draft. Do No Redistribute", and at first glance
its table of contents looks similar to Real World OCaml.

Isn't the latter redundant and in violation of whatever?

~~~
avsm
There is no shared text at all between Real World OCaml and Jason Hickey's
course notes. We wrote the RWO content from scratch due to the different style
(O'Reilly vs academic) and set of libraries used.

------
pjmlp
FCT UNL (Portugal) should probably be in the list.

Back in the mid-90's they were teaching Caml Light. Most likely they are on
OCaml nowadays.

The CS department is very strong in FP and LP languages and theory.

~~~
amirmc
Is there a link you can point us at? If it's in portugese we might have
trouble understanding it.

~~~
pjmlp
My post was in the hope that some else might have better info as me, and
comment on it.

Due to Bologna, the older pages are now gone. I can try to contact some of my
former teachers to find out the current set of languages.

------
tolkienfanatic
Ah, CS 3110. The bane of every Cornell Comp Sci majors existence.

~~~
LadyMartel
It made me think deeply about my decision to be a CS major and in the end I am
grateful. It became one of my favorite classes at Cornell.

------
mercurial
I think "all of Ocaml compiles to JS " is a bit optimistic. AFAIK, code using
Jane Street's Core stdlib doesn't work. But a lot of Ocaml code should be
fine.

~~~
avsm
All of the core compiler library does compile to efficient JavaScript. For
instance, see the IOCamlJS interactive notebooks that embed the entire
compiler in the browser with a web UI. Just press the play button:

\-
[http://andrewray.github.io/iocamljs/oh261.html](http://andrewray.github.io/iocamljs/oh261.html)
(H.261 video decoding)

\- [http://www.ujamjar.com/hardcaml/](http://www.ujamjar.com/hardcaml/)
(HardCaml RTL hardware description language, similar to Chisel in Scala)

\- [http://gazagnaire.org/fuconf14/](http://gazagnaire.org/fuconf14/)
(building a 2048 game implementation)

~~~
ufo
He was talking about Jane Street's replacement stdlib. I heard Core_kernel can
be compiled to JS though.

------
hk__2
> OCaml is a high-level language that supports […] object-oriented programming
> style

AFAIK OCaml only support records, which are like C’s structs.

Edit: no, it has real objects, as stated in comments below.

~~~
mjt0229
OCaml has a sophisticated object system. See:

[https://realworldocaml.org/v1/en/html/objects.html](https://realworldocaml.org/v1/en/html/objects.html)

You can do a lot of traditional 'OO'-style things with functors and modules,
though, so you don't need objects necessarily to get a lot of OO features.

------
dkarapetyan
F# is the way to go after the recent Microsoft announcements about .NET.

