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 LAA22544; Wed, 28 Apr 2004 11:22:21 +0200 (MET DST) 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 LAA22535 for ; Wed, 28 Apr 2004 11:22:20 +0200 (MET DST) Received: from ptb-relay02.plus.net (ptb-relay02.plus.net [212.159.14.213]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i3S9MJYM018088 for ; Wed, 28 Apr 2004 11:22:19 +0200 Received: from [80.229.56.224] (helo=chetara) by ptb-relay02.plus.net with esmtp (Exim) id 1BIlGk-000Pog-Ip for caml-list@inria.fr; Wed, 28 Apr 2004 09:22:18 +0000 From: Jon Harrop Organization: University of Cambridge To: caml-list Subject: Re: [Caml-list] [ANN] The Missing Library Date: Wed, 28 Apr 2004 10:18:14 +0100 User-Agent: KMail/1.5.4 References: <200404280613.19547.jdh30@cam.ac.uk> <1083141467.9537.845.camel@pelican.wigram> In-Reply-To: <1083141467.9537.845.camel@pelican.wigram> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200404281018.14913.jdh30@cam.ac.uk> X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 2004:99 iterator:01 exhibit:01 ignoring:01 iterator:01 generalised:01 arbitrarily:01 higher-order:01 implemented:01 hoisting:01 ocamlopt:01 unsafe:01 ocaml:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday 28 April 2004 9:37 am, skaller wrote: > On Wed, 2004-04-28 at 15:13, Jon Harrop wrote: > > ... > > more interesting connectivities than a bidirectional iterator can > > represent and which do not exhibit a clear notion of "sub". > > That isn't true. Computers can only do things in sequence > (well, ignoring fledgling parallelism). [snip] I think you've taken the STL concept of an iterator and generalised it so much that it now covers all computation. :-) This notion of an "iterator" would have to be specialised to a specific sequence-generating algorithm. That algorithm could be arbitrarily complicated. Sounds like a higher-order function to me. What aspect of this can ocaml not express/enforce? In fact, it's just a thought, but if nobody has implemented the hoisting of array bounds checking in ocamlopt yet, could this be circumvented by implementing "iterator" pairs which can be "moved" such that the range of elements that they represent is always valid. Then you could have iter, map etc. working on the range, knowing that they could use unsafe_get because it was guaranteed to be valid? Cheers, Jon. ------------------- 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