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 LAA03810; Wed, 6 Mar 2002 11:24:48 +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 LAA04199 for ; Wed, 6 Mar 2002 11:24:47 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g26AOjL14289; Wed, 6 Mar 2002 11:24:46 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id LAA03708; Wed, 6 Mar 2002 11:24:45 +0100 (MET) Date: Wed, 6 Mar 2002 11:24:45 +0100 From: Xavier Leroy To: Caml List Cc: zielony@cs.net.pl Subject: Re: [Caml-list] Toplevel question ... Message-ID: <20020306112445.C3357@pauillac.inria.fr> References: <20020228164922.A1116@order.if.uj.edu.pl> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20020228164922.A1116@order.if.uj.edu.pl>; from ostruszk@order.if.uj.edu.pl on Thu, Feb 28, 2002 at 04:49:22PM +0100 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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