Re: The distinction between "do BLOCK while COND" and "EXPR while COND" should go
[email protected] ("Christopher J. Madsen") Thu, 31 Aug 2000 13:26:26 -0500 (CDT)
| Newsgroups | perl.perl6.language.flow |
|---|---|
| Message-ID | <[email protected]> |
Tom Christiansen writes:
> >>One could argue that do{} should take return so it might have a value,
> >>but this will definitely annoy the C programmers.
>
> >So what.
>
> So what is that it *already* annoys us, which is *why* we would like to
> last out of a do. Perhaps you should be able to last out if a retval
> isn't wanted (as in do {} while) but should return out if one is?
> Or maybe a last should be an undef return?
I too would like to see last, next, & redo work with do loops. I
don't particularly care what they return; I don't think I've ever
written a do loop where I used the return value.
However, I really don't want to see 'return' become a kind of 'last'
for do{}. How would I return from a subroutine from within a do loop?
--
Chris Madsen http://www.trx.com [email protected]
TRX Technology Services (214) 346-4611