From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 8DCA6BC69 for ; Sun, 19 Aug 2007 22:51:21 +0200 (CEST) Received: from hades.snarc.org (hades.snarc.org [212.85.152.11]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l7JKpJLK021581 for ; Sun, 19 Aug 2007 22:51:21 +0200 Received: by hades.snarc.org (Postfix, from userid 1000) id 1F0BC1B482; Sun, 19 Aug 2007 22:51:15 +0200 (CEST) Date: Sun, 19 Aug 2007 22:51:14 +0200 To: Richard Jones Cc: John Carr , Caml-list List Subject: Re: [Caml-list] If OCaml were a car Message-ID: <20070819205114.GA23977@snarc.org> References: <56864F61-40F3-4F03-9823-6D510AD5320B@epfl.ch> <200708191443.l7JEhEQ8007374@psi-phi.mit.edu> <20070819170704.GA10089@furbychan.cocan.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070819170704.GA10089@furbychan.cocan.org> X-Warning: Email may contain unsmilyfied humor and/or satire. User-Agent: Mutt/1.5.16 (2007-06-11) From: tab@snarc.org (Vincent Hanquez) X-Miltered: at discorde with ID 46C8AD47.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 0100,:01 compiler:01 semicolons:01 toplevel:01 ocaml:01 printf:01 printf:01 beginners:01 beginners:01 wrote:01 partial:01 parsing:01 caml-list:01 construct:02 On Sun, Aug 19, 2007 at 06:07:16PM +0100, Richard Jones wrote: > > Unfortunately, I didn't think to start cataloging compiler error > > messages and their causes when I started learning the language. > > I did send one anomaly to the list about parsing of semicolons. > > I tell beginners that most code they write should be within a toplevel > statement: > > let _ = > ... That's very bad to advocate this kind of construct. on weird function, you are going to get caugth with partial application and ocaml will never tell you. for example: let _ = Printf.printf "something %s" in will never print ... and it will takes some time to a beginners to find what's going on. > or (better): > > let () = > ... at least this one prevent you for doing so.. -- Vincent Hanquez