[racket] raise vs abort

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Thu Jan 6 12:21:58 EST 2011

On Thu, Jan 6, 2011 at 11:14 AM, Keiko Nakata
<keiko at kurims.kyoto-u.ac.jp> wrote:
> So, I fall back into the same question of why 'raise' has to be a primitive,
> given

My totally uninformed guess is that it's because there are
C-implemented primitives that need to raise exceptions, and it's
easier for those primitives to call other C functions than to call
Racket functions.

>> >> It can be implemented in terms of continuation marks (if you know the
>> >> key for exception handlers).
> But,
> On Thu, Jan 6, 2011 at 3:29 PM, Robby Findler <robby at eecs.northwestern.edu> wrote:
>> Probably you can get very close if not exactly there if you implement
>> call-with-exception-handler at the same time.
> This may suggest there is a historical reason.
>> No, that's not what I mean. `raise' can be instructed not to install
>> the barrier (via its optional second argument),
> I remembered this only now.
>> `raise' just calls the installed exception handlers in turn, until one
>> does not return. It does not unwind the stack as `abort' does. It's
>> something like the following (very lightly tested) code.
> Yes. I think I've understood this part.
> Thanks,
> Keiko

Posted on the users mailing list.