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 TAA08379; Wed, 21 Jul 2004 19:41:29 +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 TAA09040 for ; Wed, 21 Jul 2004 19:41:28 +0200 (MET DST) Received: from mail5.bluewin.ch (mail5.bluewin.ch [195.186.1.207]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i6LHfREV022797 for ; Wed, 21 Jul 2004 19:41:28 +0200 Received: from [10.0.1.2] (195.186.135.23) by mail5.bluewin.ch (Bluewin AG 7.0.030.2) id 40ED9EB80018347D for caml-list@inria.fr; Wed, 21 Jul 2004 17:41:27 +0000 Mime-Version: 1.0 (Apple Message framework v618) In-Reply-To: <200407211552.RAA04351@pauillac.inria.fr> References: <200407211552.RAA04351@pauillac.inria.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Message-Id: <6DA682B9-DB3D-11D8-9D25-000393DBC266@epfl.ch> Content-Transfer-Encoding: quoted-printable From: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Subject: lazyness in ocaml (was : [Caml-list] kprintf with user formatters) Date: Wed, 21 Jul 2004 19:43:08 +0200 To: caml-list@inria.fr X-Mailer: Apple Mail (2.618) X-Miltered: at nez-perce with ID 40FEAAC7.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lazyness:01 caml-list:01 kprintf:01 formatters:01 pierre:01 weis:01 expr:01 expr'':01 haskell:01 combinators:01 cluttering:01 lazyness:01 ecrit:01 ocaml:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Le 21 juil. 04, =E0 17:52, Pierre Weis a =E9crit : > The drawback is that you would have to write (lazy expr) > for each argument ``expr'' to be printed. Quite a bit intrusive, I=20 > think. I agree. I once tried to port some haskell combinators [1] to ocaml.=20 However I had to stop since using them meant cluttering your code with=20= (lazy e) and lead to unreadable code. A more lightweight notation would be needed in order to do real lazy=20 programming in ocaml. At that time I wondered if specifiying the=20 lazyness when one defines the function and not when one uses it would=20 be a problem (I mean a technical problem, not an ideological one). For example if one defines let f (lazy x) =3D ... then the application f (x + y) would implicitely mean f (lazy (x + y)).=20= Alternatively something less intrusive than the keyword 'lazy' would be=20= good. Daniel [1] ------------------- 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