Re: The behaviour of iterators

2004-06-15 Thread Dan Sugalski
At 2:06 PM -0700 6/14/04, Dave Whipp wrote: "Dan Sugalski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] >Why not take a page from C++ and call "previous" and "next" C and >C, and then C to get what it points to. Because ++ and -- affect the value not the container. (There are days

Re: The behaviour of iterators

2004-06-15 Thread Dave Whipp
"Dan Sugalski" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > >Why not take a page from C++ and call "previous" and "next" C and > >C, and then C to get what it points to. > > Because ++ and -- affect the value not the container. (There are days > when I think "C++ does it like..." i

Re: The behaviour of iterators

2004-06-14 Thread Luke Palmer
Dan Sugalski writes: > At 1:08 PM -0600 6/14/04, Luke Palmer wrote: > >Dan Sugalski writes: > >> Once we decide how to *get* these things (see the previous e-mail) we > >> need to decide how they should work. We can fiddle around, but > >> honestly the scheme: > >> > >> 1) They act as arrays--if yo

Re: The behaviour of iterators

2004-06-14 Thread Dan Sugalski
At 1:08 PM -0600 6/14/04, Luke Palmer wrote: Dan Sugalski writes: Once we decide how to *get* these things (see the previous e-mail) we need to decide how they should work. We can fiddle around, but honestly the scheme: 1) They act as arrays--if you want the 18th element in the iterator, acces

Re: The behaviour of iterators

2004-06-14 Thread Luke Palmer
Dan Sugalski writes: > Once we decide how to *get* these things (see the previous e-mail) we > need to decide how they should work. We can fiddle around, but > honestly the scheme: > > 1) They act as arrays--if you want the 18th element in the iterator, > access it directly > 2) They have 'next

Re: The behaviour of iterators

2004-06-14 Thread Dan Sugalski
At 1:15 PM -0500 6/14/04, Matt Fowles wrote: Dan~ Just a few questions. Dan Sugalski wrote: 2) They have 'next', 'previous', 'first', 'last', and 'reset' methods to get the next, previous, first, or last element in the iterator, or to reset the iterator to the beginning. Next, last, and reset ch

Re: The behaviour of iterators

2004-06-14 Thread Matt Fowles
Dan~ Just a few questions. Dan Sugalski wrote: 2) They have 'next', 'previous', 'first', 'last', and 'reset' methods to get the next, previous, first, or last element in the iterator, or to reset the iterator to the beginning. Next, last, and reset change the internal current element pointer, fi

The behaviour of iterators

2004-06-14 Thread Dan Sugalski
Once we decide how to *get* these things (see the previous e-mail) we need to decide how they should work. We can fiddle around, but honestly the scheme: 1) They act as arrays--if you want the 18th element in the iterator, access it directly 2) They have 'next', 'previous', 'first', 'last', and