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 LAA04093; Wed, 6 Mar 2002 11:41:58 +0100 (MET) 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 LAA04303 for ; Wed, 6 Mar 2002 11:41:57 +0100 (MET) Received: from mailg.telia.com (mailg.telia.com [194.22.194.26]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g26AfuL15412; Wed, 6 Mar 2002 11:41:56 +0100 (MET) Received: from gateway (h175n2fls34o849.telia.com [217.208.235.175]) by mailg.telia.com (8.11.6/8.11.6) with ESMTP id g26AfsH11195; Wed, 6 Mar 2002 11:41:54 +0100 (CET) From: "Mattias Waldau" To: "'Xavier Leroy'" , "'Caml List'" Cc: Subject: RE: [Caml-list] Toplevel question ... Date: Wed, 6 Mar 2002 11:41:43 +0100 Message-ID: <003001c1c4fb$8287ae50$765da8c0@gateway> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: <20020306112445.C3357@pauillac.inria.fr> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk So it would be as if expr ;; whould have been written as let it = expr ;; in the top-level. Since I currently often write let x = expr ;; it would save me 9 keystrokes. I think it is a good idea. (But I think that soon people would ask you to keep all the lines, so that we would write it.(4) instead.) /mattias > -----Original Message----- > From: owner-caml-list@pauillac.inria.fr > [mailto:owner-caml-list@pauillac.inria.fr] On Behalf Of Xavier Leroy > Sent: Wednesday, March 06, 2002 11:25 AM > To: Caml List > Cc: zielony@cs.net.pl > Subject: Re: [Caml-list] Toplevel question ... > > > > Is there some alias in toplevel for the result of last > evaluation so > > one could use it instead of retyping (there's no history completion > > :() and binding to some name? > > The original Caml V3.1 had such a facility -- all results of > toplevel evaluations were bound to the name "it". This was > removed in Caml Light because of the way Caml Light handles > toplevel binding: all bindings accumulate forever, preventing > the GC from reclaiming the memory space used. Early versions > of Objective Caml had the same problem as Caml Light, but > this was fixed in version 3.01: only the values of lexically > visible toplevel definitions are kept. > > So, technically, it would be feasible to resurrect the Caml V3.1 > behavior: evaluating "expr ;;" at top-level binds the result > value to the name "it". Do others think that it would be useful? > > - Xavier Leroy > ------------------- > 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 ------------------- 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