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 WAA29647; Sun, 31 Mar 2002 22:40:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id WAA01392 for ; Sun, 31 Mar 2002 22:40:53 +0200 (MET DST) Received: from gromit.it.su.se (gromit.it.su.se [130.237.95.77]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g2VKepD20169 for ; Sun, 31 Mar 2002 22:40:52 +0200 (MET DST) Received: (from rnyberg@localhost) by gromit.it.su.se (8.11.6/8.11.6) id g2VKepj05558 for caml-list@inria.fr; Sun, 31 Mar 2002 22:40:51 +0200 (CEST) (envelope-from rnyberg) Date: Sun, 31 Mar 2002 22:40:51 +0200 From: Richard Nyberg To: caml-list@inria.fr Subject: [Caml-list] let or val in objects Message-ID: <20020331224051.A5546@gromit.it.su.se> Mail-Followup-To: Richard Nyberg , caml-list@inria.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I'm a bit confused regarding let bindings and nonmutable vals in objects. Are there any difference between the classes a and b? or are they equivalent? Like this: class a fd = let is = in_channel_of_descr fd in object . . Use is somewhere . . end;; class b fd = object val is = in_channel_of_descr fd . . Use is somewhere . . end;; TIA! -Richard ------------------- 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