Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] [ANN] The Missing Library
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jon Harrop <jdh30@c...>
Subject: Re: [Caml-list] [ANN] The Missing Library
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