Front page | perl.perl6.language |
Postings from October 2005
Re: Exceptuations
Thread Previous
|
Thread Next
From:
Miroslav Silovic
Date:
October 7, 2005 08:16
Subject:
Re: Exceptuations
Message ID:
4346553E.5080902@puremagic.com
lrpalmer@gmail.com wrote:
>I'm not bashing your idea, because I think it has uses. But I'll
>point out that all of these can be easily accompilshed by writing a
>wrapper for open(). That would be the usual way to abstract this kind
>of thing.
>
>
>
My take on this: resumable exceptions break encapsulation no more (and
no less) than using callbacks. The function that throws a resumable
exception can only do this knowingly, and it could just as well offer a
callback for that specific patchable error. So why take away a
potentially highly useful tool?
BTW, two languages I know of have resumable exceptions: Common LISP and
TOM. Neither supports continuations, instead, they separate raising
exception (which runs a handler; this is implemented as a callback) from
unwinding stack (which happens when the handler actually throws; it can
choose to return instead, resuming execution if the raising function is
okay with it). At least in Common LISP this is used a *lot* during
interactive development, as it allows the developer to quickly patch
things up without reruning the failed test. Assuming perl6 keeps the
pugs-style interactive shell, I suspect resumable exceptions will be
quickly added into the standard library if they don't pass into the
standard. Yes, they're that useful.
Miro
Thread Previous
|
Thread Next