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

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 04:12:17PM -0700, Peter Scott wrote: > >Would someone please enlighten me as to the purpose of an explicit "try." > > Well, for one, it makes it easier to see that a block is subject to > exception handling if all you have to do is look at the beginning for 'try' > rathe

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 10:52:02PM -0400, Chaim Frenkel wrote: > Why does all the unwinding stuff have to be there? Let $@ exist in > the always block the iff $@ is defined then you are unwinding and > do your wishes. Otherwise you are just falling out of the BLOCK. > > Why all the extra syntax?

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 05:14:56PM -0700, Peter Scott wrote: > You want: while handling an exception, throwing another exception pushes > the first one onto a stack which could be reported en masse when the coup > de gras arrives. Like VMS error cascading. You do this with a _link > attribute

Re: Exceptions and Objects

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 06:23:57PM -0600, Tony Olekshy wrote: > Jonathan Scott Duff wrote: > > > > What's wrong with just using the switch statement? It seems > > like except and catch are becoming special-purpose switches > > to me. Is it really necessary? > > It's not necessary, but it is th

Re: RFC 63 (v3) Exception handling syntax

2000-08-15 Thread Chaim Frenkel
> "PS" == Peter Scott <[EMAIL PROTECTED]> writes: >> Please include the comments about global variables and action at a distance. PS> I'm sorry, my brain is fried. Can you spell out for me what you mean in PS> this context and I'll put it in. I am adamant against increasing the number of

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Chaim Frenkel
Sorry, I keep reading it, even with your explanation, as "ignore this type". A more positive word would be better. I think the entire structure is too complex (is baroque the right term?). I haven't seen a good reason that it should be any more complex than do BLOCK oops

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Tony Olekshy
Peter Scott wrote: > > Tony Olekshy wrote: > > > >finally { ... } > > > > Invoked whether or not unwinding. If the finally block > > throws then unwinding starts or continues, if finally > > doesn't throw then the unwinding state is not changed. > > Inside the

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Tony Olekshy
Chaim Frenkel wrote: > > Tony Olekshy wrote: > > > > except { ... } => catch { ... } > > > > Invoked if unwinding and the except block returns true. > > In the except block, $@ is the current exception. > > If the except or catch blocks throw, unwinding continues. > > If both co

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

2000-08-15 Thread Tony Olekshy
David L. Nicol wrote: > > What if "try" were implied by the appearance of "catch" keywords, > which expire at the close of their block? > > Would someone please enlighten me as to the purpose of an explicit > "try." The "try" is not necessarily for Perl's sake. It's for the programmer's sake.

Re: Exceptions and Objects

2000-08-15 Thread Tony Olekshy
Jonathan Scott Duff wrote: > > What's wrong with just using the switch statement? It seems > like except and catch are becoming special-purpose switches > to me. Is it really necessary? It's not necessary, but it is the whole point of it all. Try is "just" a special-purpose if, except is a sp

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Peter Scott
At 12:35 AM 8/15/00 -0600, Tony Olekshy wrote: >What if we implemented something like the following? >finally { ... } > > Invoked whether or not unwinding. If the finally block > throws then unwinding starts or continues, if finally > doesn't throw then the unwinding s

Re: RFC 63 (v3) Exception handling syntax

2000-08-15 Thread Peter Scott
Hmm, it now appears that everything on this subject has to go to perl6-language-errors and perl6-language-flow. At 03:26 PM 8/15/00 -0400, Chaim Frenkel wrote: > > "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: > >PRL> RFC 80 proposes standard exception classes and methods for core

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

2000-08-15 Thread Peter Scott
At 08:11 PM 8/15/00 +, David L. Nicol wrote: >What if "try" were implied by the appearance of "catch" keywords, which >expire at the close of their block? > > catch [EXCEPTION [, ...] ] BLOCK > ,... > BLOCK This is definitely a nifty concept that strikes me as very Per

Re: new -language sublists. perl6-language-datetime and perl6-language-errors

2000-08-15 Thread Peter Scott
At 03:55 PM 8/15/00 -0700, you wrote: >LIST: perl6-language-errors >CHAIR: Steve Simmons <[EMAIL PROTECTED]> >MISSION:To develop RFCs related to error handling and exceptions > in Perl 6, possibly combining existing RFCs into a more > cohe

Re: Unify the Exception and Error Message RFCs?

2000-08-15 Thread Steve Simmons
On Mon, Aug 14, 2000 at 05:43:08PM -0700, Peter Scott wrote: > >IMHO trading six RFCs for two will greatly improve the chance of passing. > > As I've said before, I don't think there's a competition here. My remark was poorly phrased, sorry. I was trying to say that a single proposal which is

Unify the Exception and Error Message RFCs?

2000-08-15 Thread Steve Simmons
On Sun, Aug 13, 2000 at 07:35:06PM -0700, Peter Scott wrote: > At 03:30 PM 8/13/00 -0500, David L. Nicol wrote: > >Whose RFC deals with this? > 63, 70, 80, 88 and 96. There would appear to be a groundswell of interest :-) Well yes, but they represent three authors with (as best I can tell) pr

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

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 08:11:55PM +, David L. Nicol wrote: [ nifty tryless code snipped ] > The reason is, this way, we don't have to keep track of, are we in > a try or not, while running. We always are. An error happens, we > back out of blocks until we find an appropriate catch if any.

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

2000-08-15 Thread David L. Nicol
>Maintainer: Peter Scott <[EMAIL PROTECTED]> >Date: 8 Aug 2000 >Last-Modified: 14 Aug 2000 >Version: 3 >Mailing List: [EMAIL PROTECTED] >Number: 63 > An exception handling mechanism is proposed with the following syntax: > > exception EXCEPTI

Re: RFC 63 (v3) Exception handling syntax

2000-08-15 Thread Chaim Frenkel
> "PRL" == Perl6 RFC Librarian <[EMAIL PROTECTED]> writes: PRL> RFC 80 proposes standard exception classes and methods for core exceptions. PRL> This RFC doesn't need to repeat those, but it can expound upon the PRL> semantics that exception classes ought to have. Assume wlog that they PRL>

Re: Exceptions and Objects

2000-08-15 Thread Peter Scott
At 06:01 PM 8/15/00 +0100, Graham Barr wrote: >Also, I have come to dislike the name `exception', its too long for me :) >and who says we have to copy everyone else. > >Lookin in the thesaurus we get > >[Nouns] nonconformity [more]; unconformity, disconformity; >unconventionality, informality, abn

Re: Exceptions and Objects

2000-08-15 Thread Jonathan Scott Duff
On Tue, Aug 15, 2000 at 06:01:33PM +0100, Graham Barr wrote: > As perl is an exceptional language itself, why not have > `freaks' instead :) How about just "oops"? :-) -Scott -- Jonathan Scott Duff [EMAIL PROTECTED]

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 { } > > > catch SomeOtherException { } > > >

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 Jonathan Scott Duff
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 { } > > catch SomeOtherException { } > > finally { } > > > > which seems to only catch exceptions based on name.

Re: Exceptions and Objects

2000-08-15 Thread Jonathan Scott Duff
On Mon, Aug 14, 2000 at 08:50:41PM -0600, Tony Olekshy wrote: > Jonathan Scott Duff wrote: > > try { } > > catch { # ALL exceptions > > switch ($@) { > > case ^_->name eq 'IO' { ... } > > case ^_->canFoo

RFC 63 (v3) Exception handling syntax

2000-08-15 Thread Perl6 RFC Librarian
This and other RFCs are available on the web at http://dev.perl.org/rfc/ =head1 TITLE Exception handling syntax =head1 VERSION Maintainer: Peter Scott <[EMAIL PROTECTED]> Date: 8 Aug 2000 Last-Modified: 14 Aug 2000 Version: 3 Mailing List: [EMAIL PROTECTED]

Re: Toward an omnibus Perl 6 Exceptions RFC, v0.1.

2000-08-15 Thread Chaim Frenkel
> "TO" == Tony Olekshy <[EMAIL PROTECTED]> writes: TO> except { ... } => catch { ... } TO> Invoked if unwinding and the except block returns true. TO> In the except block, $@ is the current exception. TO> If the except or catch blocks throw, unwinding continues. TO> If bo

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: Exceptions and Objects

2000-08-15 Thread Piers Cawley
Jonathan Scott Duff <[EMAIL PROTECTED]> writes: > On Sun, Aug 13, 2000 at 10:51:24PM -0700, Peter Scott wrote: > > Could be. I'd be interested in seeing non-OOP proposals that do what I > > want exceptions to do, I have a hard time imagining one. > > Well, what is it that you want exceptions t