Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Ml > [smlnj] callcc ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 2 Topic 951 of 968
Post > Topic >>

[smlnj] callcc and throw vs. capture and escape

by Ronald Garcia <ron.garcia@[EMAIL PROTECTED] > Apr 10, 2008 at 08:19 AM

Hi,

I am using SMLNJ and trying to understand the difference between
callcc/throw and capture/escape.  As far as I can tell, they differ
only in how they treat exception handlers; however the textual
descriptions of them that I have seen are not clear to me.

For instance:

capture f
Apply f to the "current continuation". If f invokes this continuation
with argument x, it is as if (capture f) had returned x as a result,
except that the exception-handler is not properly restored (it is
still that of the invoker).

This description makes it sound as though each continuation has only
one exception handler.  However my intuition for exceptions suggests
that handlers should be sprinkled throughout the continuation (one for
every "handle" expression in the current dynamic extent).  Is the
description I quote above written in terms of how exceptions are
implemented in SMLNJ (i.e. does a continuation have a single
"exception handler" that handles all exceptions), or does SML really
have a notion of a single exception handler?

Is there a formal specification of capture and escape somewhere?
Perhaps something similar to Felleisen and Wright's specification of
callcc in CoreML?

Thanks,
ron
 




 2 Posts in Topic:
[smlnj] callcc and throw vs. capture and escape
Ronald Garcia <ron.gar  2008-04-10 08:19:59 
Re: [smlnj] callcc and throw vs. capture and escape
Matthias Blume <find@[  2008-04-26 00:05:24 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 5:31:45 CDT 2008.