To my experience, this is a bad practice, that produces lots of confusion to students. They should clearly understand difference between writing code in a toplevel and normal programming. A difference between definition on a module level, and an expression. I usually say that `;;` is not a part of a language, but just a part of a toplevel command syntax (as well as toplevel directives), and strictly require not to put `;;` in code. On Mon, Jun 22, 2015 at 9:31 AM, Alan Schmitt < alan.schmitt@polytechnique.org> wrote: > Hello, > > In my Ocaml class, I tend to promote the use of ";;" to separate phrases > (I'm basically following > > http://ocaml.org/learn/tutorials/structure_of_ocaml_programs.html#Usingandomittingand > although I was not aware of this page when I created the course). My > motivation is to minimize the difference between using the top-level and > writing files. > > I am now wondering if this is a good practice. In a nutshell, would you > rather use > > #+begin_src ocaml > let x = 12;; > print_endline "Hello World!" > #+end_src > > or > > #+begin_src ocaml > let x = 12 > let () = print_endline "Hello World!" > #+end_src > > when teaching Ocaml? > > Thanks, > > Alan > > -- > OpenPGP Key ID : 040D0A3B4ED2E5C7 > Weekly CO₂ average (2015-05-30, Mauna Loa Observatory): 403.41 ppm >