Aaron Sherman [mailto:[EMAIL PROTECTED]] wrote:
 > what about 
> > 
> >     while (do_something_with_side_effects_and_check_still_ok()) {
> > 
> > I presume we don't want to do look-ahead here.
> 
> Yes, I think he was saying exactly that we will do look-ahead 
> here. "we don't guarantee order of evaluation" is exactly saying
> that, no?

As the "he" refered to, let me be absolutely clear that I am
*not* suggesting any type of look-ahead here. I was specifically
talking about the C<foreach> loop, where Perl is expected to
implement the iterator. In a C<while> loop, the programmer
controls the iterator, and would be surprised by a loop-ahead.

The implication is that we can only provide advanced "PRE_LAST"
style blocks (or their equiv.) on the C<foreach> loop. The fact
that they are impossible on the C<while> loop should not
constrain our thinking for the C<foreach> loop.


Dave.

Reply via email to