caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] use of ";;" when teaching Ocaml
@ 2015-06-22 13:31 Alan Schmitt
  2015-06-22 13:52 ` Ivan Gotovchits
                   ` (4 more replies)
  0 siblings, 5 replies; 29+ messages in thread
From: Alan Schmitt @ 2015-06-22 13:31 UTC (permalink / raw)
  To: OCaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 472 bytes --]

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2015-06-29  0:12 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-22 13:31 [Caml-list] use of ";;" when teaching Ocaml Alan Schmitt
2015-06-22 13:52 ` Ivan Gotovchits
2015-06-22 13:53 ` Daniil Baturin
2015-06-22 14:19 ` Gerd Stolpmann
2015-06-22 15:48   ` Damien Doligez
2015-06-22 15:56     ` Thomas Refis
2015-06-22 16:07       ` Mark Shinwell
2015-06-22 16:30         ` Gerd Stolpmann
2015-06-22 16:47           ` Mark Shinwell
2015-06-22 17:08             ` Daniel Bünzli
2015-06-22 18:56             ` Gerd Stolpmann
2015-06-22 17:18           ` Török Edwin
2015-06-22 17:42         ` Francois Berenger
2015-06-22 17:46           ` Ivan Gotovchits
2015-06-22 17:53           ` John Whitington
2015-06-22 16:07     ` Pippijn van Steenhoven
2015-06-22 16:25       ` Daniel Bünzli
2015-06-22 18:18       ` Steve Zdancewic
2015-06-22 16:42   ` Thomas Refis
2015-06-22 16:47     ` David House
2015-06-22 17:08     ` Daniil Baturin
2015-06-22 17:04 ` Daniel Bünzli
2015-06-22 23:41 ` Philippe Wang
2015-06-23  1:15   ` Kenichi Asai
2015-06-23 13:27   ` Alan Schmitt
2015-06-23 13:35     ` Ivan Gotovchits
2015-06-23 13:36       ` Ivan Gotovchits
2015-06-25 16:51     ` Philippe Wang
2015-06-29  0:12       ` Philippe Wang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).