From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id DAA09120 for caml-redistribution; Tue, 27 Jul 1999 03:48:45 +0200 (MET DST) 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 OAA23502 for ; Sat, 24 Jul 1999 14:53:39 +0200 (MET DST) Received: from iggy.triode.net.au (iggy.triode.net.au [203.63.235.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id OAA25805 for ; Sat, 24 Jul 1999 14:53:36 +0200 (MET DST) Received: from egret (pm1-28.triode.net.au [203.63.235.44]) by iggy.triode.net.au (8.9.3/8.8.8) with SMTP id WAA00640; Sat, 24 Jul 1999 22:51:50 +1000 Message-Id: <3.0.6.32.19990724224541.0096ac40@mail.triode.net.au> X-Sender: skaller@mail.triode.net.au X-Mailer: QUALCOMM Windows Eudora Light Version 3.0.6 (32) Date: Sat, 24 Jul 1999 22:45:41 +1000 To: Andrew Kennedy , "'Markus Mottl'" , caml-list@inria.fr From: John Skaller Subject: RE: optimization and purity In-Reply-To: <7CD674FF54FBD21181D800805F57CD5488B073@RED-MSG-44> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: weis At 08:48 23/07/99 -0700, Andrew Kennedy wrote: >> -----Original Message----- >> From: Markus Mottl [mailto:mottl@miss.wu-wien.ac.at] >> Subject: optimization and purity >> >> I would like to know whether anyone has already thought about means of >> indicating or inferring purity of functions. >> >You are indeed correct that knowing the purity of functions would permit a >number of optimisations such as the loop-hoisting example you present. Actually, I'm quite interested in the same thing from a different angle: rather than being concerned with _compiler_ code optimisation, I'm concerned with human ability to reason about code: ocaml loses the simplicity of reasoning about derived from referential transparency available in 'pure' functional languages. (But of course the two things are strongly related) ------------------------------------------------------- John Skaller email: skaller@maxtal.com.au http://www.maxtal.com.au/~skaller phone: 61-2-96600850 snail: 10/1 Toxteth Rd, Glebe NSW 2037, Australia