News for hackers. Stuff that matters.
Re:A brief introduction to OCaml by mercurial on Sunday June 14, 2015 @07:55AM (#9714570)
> The idea is you can write this:

>

> let _ = print_string "foo"

> let _ = print_string "bar"

>

> at the top level.

Ah. Well, the solution is not use "let _" or ";;", the solution is to avoid sociopathic code like that. Module definition with built-in, unavoidable side effects are evil.

Re:A brief introduction to OCaml by lpw25 on Sunday June 14, 2015 @06:04PM (#9716492)
You need at least one module that does something at top-level, otherwise your program won't do anything.
Re:A brief introduction to OCaml by jordwalke on Sunday June 14, 2015 @03:03PM (#9715975)
For serious development, yes, but consider the people who are learning OCaml. One of the first programs is going to be some kind of side effecting hello world etc.