From: Tom Christiansen [mailto:[EMAIL PROTECTED]]
> From: Jarkko Hietaniemi
>
> >I find this urge to push exceptions everywhere quite sad.
> 
> Rather. 
> 
> Languages that have forgotten or dismissed error returns, turning
> instead to exceptions for everything in an effort to make the code
> "safer", tend in fact to produce code that is tedious and annoying.

There seems to be some general consensus that some people would like to be
able to short-circuit functions like grep. Do you see no need for the code
block equivalent of C<next>/C<last>/C<redo>?

sub mygrep (&@) { ... }
@results = mygrep { $_ == 1 } (1..1_000_000);

How would you do it with out exceptions?

People have been quick to shoot down the various proposals for a standard
mechanism to short-circuit built-in and user-defined subroutines.  Is this
because it shouldn't be done... or do people just not like ideas being
proposed to do it?

Garrett

P.S. I'm curious. is the C<return> control implemented as macro for throwing
an exception that is caught and handled by a subroutine? I.e., is there a
parallel between how C<next>/C<last>/C<redo> and C<return> are implemented?

Reply via email to