That's true, although it's probably a little easier to spot a missing ;; than a non-missing trailing ;. I expect that on balance you'll have better errors more often with using ;;. So it seems sensible to use it for teaching beginners. Once you're an old hand like Mark Shinwell, you can make up your mind whether it's worth keeping it up or not ;) On 22 June 2015 at 17:42, Thomas Refis wrote: > 2015-06-22 15:19 GMT+01:00 Gerd Stolpmann : > > There is one downside of not using ";;", namely that you sometimes get > > syntax errors much later than necessary. E.g. in > > > > let x = > > do_this(); > > do_that(); > > let y = 6 > > let z = > > do_third_thing() > > > > you get the syntax error at the position of the third "let" although it > > is the extra semicolon at the end of the first definition. This can be > > very confusing, and it is a very good reason to use ";;" outside the > > toplevel. IMHO it is better to be honest about this issue. Because "let" > > is an open-ended construction the ";;" can be useful as end marker, and > > the compiler emits better error messages with more precise locations. > > The argument seems a bit weak. > The example is (if I understand correctly): "I have a trailing > semicolon which the compiler doesn't report properly but instead tells > me there is a syntax error in a completely unrelated place! If you > place double semicolons in your code, that doesn't happen!". > But it could also be understood as: "I usually place double > semicolons, but in this case I forgot. And the compiler doesn't report > this properly but instead tells me there is a syntax error in a > completely unrelated place!". > > You face the same problem either way, you still have to be "fluent" to > know where to look when you encounter this error. > And I'd guess a beginner is as likely to forget the ";;" as to leave a > trailing ";". > > -- > Caml-list mailing list. Subscription management and archives: > https://sympa.inria.fr/sympa/arc/caml-list > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >