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 PAA15807; Tue, 21 Jan 2003 15:42:56 +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 PAA15157 for ; Tue, 21 Jan 2003 15:42:56 +0100 (MET) Received: from albatross.mail.pas.earthlink.net (albatross.mail.pas.earthlink.net [207.217.120.120]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h0LEgtr19920 for ; Tue, 21 Jan 2003 15:42:55 +0100 (MET) Received: from user-0cev2t6.cable.mindspring.com ([24.239.139.166] helo=[192.168.0.3]) by albatross.prod.itd.earthlink.net with esmtp (Exim 3.33 #1) id 18azbz-0004VZ-00; Tue, 21 Jan 2003 06:42:47 -0800 Subject: Re: [Caml-list] view types in ocaml? From: "Yaron M. Minsky" To: Oliver Bandel Cc: Caml List In-Reply-To: <20030121134608.GA495@first.in-berlin.de> References: <8765sj718s.fsf@cs.uga.edu> <1043153665.12441.1603.camel@dragonfly.localdomain> <20030121134608.GA495@first.in-berlin.de> Content-Type: text/plain Organization: Cornell University Message-Id: <1043160165.17408.1612.camel@dragonfly.localdomain> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.1 Date: 21 Jan 2003 09:42:46 -0500 Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, 2003-01-21 at 08:46, Oliver Bandel wrote: > > Well, I think that it is very good to have the values printed > always. > > I like that. > > The toplevel is very good for testing code and doing > experiments - and therefore it is very good to have > the values printed always. For the record, my suggestion is only that let-bound value printing should be suppressed. You could always see the result by just not binding it (e.g., typing "foo x y z" instead of "let a = foo x y z".) And you can always get the contents of any variable printed by typing it's name on the command line (e.g. "a;;" to see the contents of variable a). > If I don't need such helpers and code my code directly, > I can write it into a file and let ocamlc or > ocamlopt do its work. But if you're doing interactive work with data of non-trivial size, the constant printing is real pain. I do an enormous amount of work interactively at the command line, and more often than not, the data structure print-outs are so long that I can't see the line I just typed into the interpreter. > But maybe it makes sense to have options in the toplevel > to disable such printings. Making the suppression controllable by command-line options is sensible. But I do think that it should be the default. There's a reason that most language interpreters have this suppression, and I don't think there's anything special about ocaml that makes it different in this regard. Another useful extension to the ocaml toplevel which has been proposed in the past is to have some kind of default "this" variable which stores unbound variables. That would make the supression of let-bound easier to use, since if you wanted to see how something printed out, you could refrain from let-binding it, and still get access to the result using the "this" variable. > But it is no good idea to disable it hardcoded. > > I prefer the possibility to have such printings, > but think optionally turining it off would be ok. > > Ciao, > Oliver ------------------- 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