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 AAA32672; Sun, 15 Jul 2001 00:01:02 +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 AAA32753 for ; Sun, 15 Jul 2001 00:01:01 +0200 (MET DST) Received: from str12.sobor.org (adsl-63-198-183-99.dsl.snfc21.pacbell.net [63.198.183.99]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f6EM0xD06379; Sun, 15 Jul 2001 00:00:59 +0200 (MET DST) Received: from quasar.ipa.nw.ru (anza.sobor.org [192.168.123.51]) by str12.sobor.org (Postfix) with ESMTP id 8BDBDAC8AA; Sat, 14 Jul 2001 14:47:26 -0700 (PDT) Message-ID: <3B50C0CC.811F9560@quasar.ipa.nw.ru> Date: Sat, 14 Jul 2001 14:59:40 -0700 From: "Alexander V. Voinov" Organization: Fear of the Lord is the beginning of wisdom X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Daniel de Rauglaudre , caml Subject: Re: [Caml-list] Generation of streams is slow References: <3B4F70D7.82E58A91@quasar.ipa.nw.ru> <20010714042701.A24266@verdot.inria.fr> <3B4FB39D.10D1F6D5@quasar.ipa.nw.ru> <20010714060417.A25766@verdot.inria.fr> <3B4FC748.F9E14008@quasar.ipa.nw.ru> <3B4FCD2B.FC68C181@quasar.ipa.nw.ru> <20010714103426.B26003@verdot.inria.fr> <3B508A89.82717B26@quasar.ipa.nw.ru> <20010714210228.B2256@verdot.inria.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Daniel de Rauglaudre wrote: > > Hi, > > On Sat, Jul 14, 2001 at 11:08:09AM -0700, Alexander V. Voinov wrote: > > > h::(make_tail arg1 argN), > > that is > > CALL make_tail > > CONS > > and change them to > > PREPARE_CONS > > CALL make_tail > > the scope of tail recursion optimization would increase. But it's > > unlikely that this idea didn't come to developers. Which may mean that > > this [being not that simple] is impossible. > > It supposes that the order of evaluation could be variable. If we > imagine a constructor C with 5 parameters. If we evalutate: > > C (a, b, c, d, e) I don't understand, however, the argument about the order of evaluation in _this_ case, that is of h::(make_tail args). The value of `h' is supposed to be computed to this point, and whatever side effects are present in `make_tail', they cannot influence the result of ::, which is context-independent. The only difference might be the exceptions, which can appear in `make_tail' and propagate somewhere, but the result will not be returned anyway (the call to :: is supposed to be the _last_), so it doesn't matter if :: is prepared to accept it or not. Or to introduce a special version of ::, say :!:, which ensures that the call to make_tail is really the last. Alexander ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr