From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA27258; Tue, 3 Aug 2004 17:11:52 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id RAA26476 for ; Tue, 3 Aug 2004 17:11:51 +0200 (MET DST) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i73FBoSH010403 for ; Tue, 3 Aug 2004 17:11:50 +0200 Received: by mproxy.gmail.com with SMTP id 75so147418rnl for ; Tue, 03 Aug 2004 08:11:49 -0700 (PDT) Received: by 10.38.81.50 with SMTP id e50mr311895rnb; Tue, 03 Aug 2004 08:11:49 -0700 (PDT) Message-ID: Date: Tue, 3 Aug 2004 11:11:49 -0400 From: John Prevost To: Ocaml Mailing List Subject: Re: [Caml-list] let () = In-Reply-To: <86hdrkth3f.fsf@paul.rtelekom.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <86hdrkth3f.fsf@paul.rtelekom.ru> X-Miltered: at concorde with ID 410FAB36.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; prevost:01 prevost:01 caml-list:01 typecheck:01 unit:03 explicitly:03 argument:03 let:04 let:04 executing:04 executing:04 somewhat:06 type:07 type:07 john:09 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk It really means "I expect bla to have type unit, and am executing it here for side effects." Some people write instead: let _ = bla Which means "I don't care what type bla has, but am executing it for side effects." The let () one is somewhat safer because you are explicitly saying you don't expect the call to return anything. The _ one, you might leave an argument out, and it would still typecheck. JOhn. ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners