Re: RFC 120 (v2) Implicit counter in for statements, possibly $#.

2000-08-20 Thread Graham Barr
On Sat, Aug 19, 2000 at 09:23:03AM -0400, Ken Fox wrote: > "Christopher J. Madsen" wrote: > > foreach $item $index (@array) { > > print $item, " is at index ", $index, "\n"; > > } > > That's useful syntax, but I'd rather it mean stepping > pair-wise through @array. Then we could scan

Re: RFC 120 (v1) Implicit counter in C statements, possibly C<$#>.

2000-08-16 Thread Graham Barr
On Wed, Aug 16, 2000 at 11:42:20AM -1000, Tim Jenness wrote: > What about: > > for (0..$#array) { > print $array[$i], " is at index ", $i, "\n"; > } > > I use that whenever I need to loop over indices of two arrays at once. And with the proposed zip() you may be able to do so

Re: "Try? There is no try." -- Yoda's Exception handling syntax

2000-08-16 Thread Graham Barr
On Tue, Aug 15, 2000 at 08:11:55PM +, David L. Nicol wrote: > Would someone please enlighten me as to the purpose of an explicit "try." In my mind it allows the important code to come before the "oh crap something went wrong" code. Graham.

Re: RFC 63 (v3) Exception handling syntax

2000-08-16 Thread Graham Barr
On Tue, Aug 15, 2000 at 04:39:24PM -0700, Peter Scott wrote: > >PRL> =head2 Exception classes - ignoring > > > >PRL> Note that we could also make it possible to selectively or globally > >ignore > >PRL> exceptions, so that perl continues executing the line after the C > >PRL> statement. Just imp

Re: Exceptions and Objects

2000-08-15 Thread Graham Barr
On Tue, Aug 15, 2000 at 11:47:03AM -0500, Jonathan Scott Duff wrote: > On Tue, Aug 15, 2000 at 11:47:32AM +0100, Graham Barr wrote: > > On Mon, Aug 14, 2000 at 10:56:36AM -0500, Jonathan Scott Duff wrote: > > > try { } > > > catch SomeException { } >

Re: Exceptions and Objects

2000-08-15 Thread Graham Barr
On Tue, Aug 15, 2000 at 11:43:41AM -0500, Jonathan Scott Duff wrote: > On Mon, Aug 14, 2000 at 08:50:41PM -0600, Tony Olekshy wrote: > > Jonathan Scott Duff wrote: > > > try { } > > > catch { # ALL exceptions > > > switch ($@) { > > >

Re: Exceptions and Objects

2000-08-15 Thread Graham Barr
On Mon, Aug 14, 2000 at 10:56:36AM -0500, Jonathan Scott Duff wrote: > On Mon, Aug 14, 2000 at 04:09:41AM -0600, Tony Olekshy wrote: > > $@->CanFoo is an example of semantics that determines whether or > > not the exception is caught; stringification may be an example > > of semantics that comes i

Re: errors and their keywords and where catch can return toandst uff like that

2000-08-15 Thread Graham Barr
On Mon, Aug 14, 2000 at 10:15:21PM -0700, Peter Scott wrote: > At 08:56 PM 8/14/00 -0600, Tony Olekshy wrote: > >consider this: > > > > try { may_throw_1; } > > catch { may_throw_2; } > > catch { may_throw_3; } > > finally { may_throw_4; } > > That's either a syntax error

Re: errors and their keywords and where catch can return toand stuff like that

2000-08-14 Thread Graham Barr
On Mon, Aug 14, 2000 at 04:16:42AM -0600, Tony Olekshy wrote: > Peter Scott wrote: > > > > David L. Nicol wrote: > > > > >Further discussion in the thread discussed the idea of returning > > >to the point of throwing, as the routine noting the error might > > >be supposed to ignore this error, t

Re: RFC 80 (v1): Exception objects and classes for builtins

2000-08-11 Thread Graham Barr
On Fri, Aug 11, 2000 at 09:36:32AM -0700, Peter Scott wrote: > Redirected to perl6-language-flow. > > At 10:39 AM 8/11/00 -0400, John Porter wrote: > >Piers Cawley wrote: > > > > > > The (continue|always|finally|whatever) clause will *always* be > > > executed, even if one of the catch clauses do

Re: exception and error RFCs

2000-08-08 Thread Graham Barr
On Mon, Aug 07, 2000 at 11:32:54PM -0400, Uri Guttman wrote: > > "PS" == Peter Scott <[EMAIL PROTECTED]> writes: > > > PS> http://search.cpan.org/doc/GBARR/Error-0.13/Error.pm > > PS> That says everything I want to say. If you put that in exactly > PS> the way it is I will be ecstati