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 JAA17813 for caml-red; Fri, 21 Jul 2000 09:22:55 +0200 (MET DST) 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 TAA16844 for ; Wed, 19 Jul 2000 19:56:12 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by concorde.inria.fr (8.10.0/8.10.0) with ESMTP id e6JHuBn23073 for ; Wed, 19 Jul 2000 19:56:11 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id TAA25941; Wed, 19 Jul 2000 19:56:00 +0200 (MET DST) Date: Wed, 19 Jul 2000 19:56:00 +0200 From: Markus Mottl To: Julian Assange Cc: caml-list@inria.fr Subject: Re: moderation of caml-list Message-ID: <20000719195600.A10482@miss.wu-wien.ac.at> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2i In-Reply-To: ; from proff@iq.org on Wed, Jul 19, 2000 at 05:00:09 +1000 Sender: weis@pauillac.inria.fr On Wed, 19 Jul 2000, Julian Assange wrote: > As a side note, I'd like to again express my desire for type-inferment > of side-effects and exceptions in closures containing them or > references to functions that do (and so on). Apart from making the > code easier to read and debug this would also permit: Although I would also like to see something like this, I fear that implementing a "good-enough" solution would draw human resources that are currently probably better invested elsewhere... In any case: having information of this sort at compile time would allow some really nice transformations/optimizations, much more powerful ones than just factoring of common subexpressions or lifting of expressions. E.g., one could safely apply transformations like partial evaluation, deforestation/fusion or automatic introduction of accumulators for tail-recursiveness, etc... For people interested in program transformations, here is a nice overview: @Article{Pettorossi-Proietti96, key = "Pettorossi \& Proietti", author = "Alberto Pettorossi and Maurizio Proietti", title = "Rules and Strategies for Transforming Functional and Logic Programs", journal = "ACMCS", volume = "28", number = "2", pages = "360--414", month = jun, year = "1996", annote = "Many references.", } You can get it from here: http://www.iasi.rm.cnr.it/~proietti/reports.html I especially like the example where the straightforward (exponential) fibonacci function is transformed by a series of automatable rule applications to one which runs in logarithmic time (yes, I mean *logarithmic*, not linear - I didn't know of this trick either...). Such superexponential speedups are indeed very attractive! 8-) Unfortunately, some transformations require purity... Best regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl