ntax around your EXPR
> to disambiguate it then => seems as good as any and it has that neat "this
> thing causes this thing" interpretation.
Okay, I'm just registering my opinion that I don't like it. :-)
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Thu, Aug 24, 2000 at 10:10:49AM -0700, Peter Scott wrote:
> At 12:07 PM 8/24/00 -0500, Jonathan Scott Duff wrote:
> > > catch Alarm => { ... }
> > > catch Alarm, Error => { ... }
> > > catch $@ =~ /divide by 0/ => { ... }
> >
> >T
on can be parsed from the block, in the fashion
> of Perl 5's C;
You mean like this?
@doubles = map { $_*2 } @numbers;
I don't see a comma or => in there at all ;-)
> Lexical Scope
>
> The authors would prefer that try, catch, and finally blocks
> share the same lexical scope.
A few of us random commentators agree with this as well.
my $cents = 2;
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 16, 2000 at 12:52:07PM -0700, Peter Scott wrote:
> At 09:29 AM 8/16/00 -0500, Jonathan Scott Duff wrote:
> >Let me draw another picture (with "try" and "catch" this time):
> >
> > try {
> > # cod
I
> and others would like:
>
> my $fh = open $filename;
>
> how should we distinguish the one that throw()s from the one that doesn't?
Use a pragma. "use exceptions"
But, of course, that's equivalent to "setting a global switch" for
some definitions of "global".
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
in another email that "undef $@" would do it. But that's
just an idea.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 16, 2000 at 11:49:03AM +0100, Graham Barr wrote:
> if any of the catch or finally throws, it is caught by a
> try {} block up the stack.
>
> Keep It Simple
What he said.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
On Wed, Aug 16, 2000 at 11:46:12AM -0700, Peter Scott wrote:
> At 12:10 AM 8/16/00 -0500, Jonathan Scott Duff wrote:
> >Why not have a special array that acts as an exception stack and each
> >exception knows what file/line/whatever? Then you can get both behaviors
> >w
e read it ... perhaps that's what even gave me the idea, but that's
a big document and I haven't absorbed all the details yet.
> We are trying to fix that problem. Nature abhors globals.
It's an array in a namespace specifically for Perl. I don't see how
adding a private
ut not handle it, they just don't undef $@.
BTW, I hope you guys don't find me frustrating, I'm just trying to
decide what exception handling should look like in Perl to me.
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
10 matches
Mail list logo