Mark Dominus on 23 Aug 2012 11:23:25 -0700


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: The case against call/cc


> I thought that since we are all continuation junkies here, we might
> find this interesting:
> http://okmij.org/ftp/continuations/against-callcc.html
> 
> The article argues that call/cc is a bad core feature for a language

For those who don't know Oleg's research, and who don't read the
article, take note that Oleg is not arguing against *continuations*,
but only against this particular language feature, the so-called
"undelimited" continuation capture. He has spent a lot of time and
work investigating a related but different feature, called "delimited"
continuations, which he sees as a major improvement:

        Despite sounding pretty much alike, undelimited and delimited
        continuations are qualitatively different. Since a delimited
        continuation is a mapping between contexts, it may truly be a
        function, which returns and can be composed. Undelimited
        continuations are not true functions. Undelimited and
        delimited continuations also differ in expressiveness, and
        this difference has been proven. First-class delimited
        continuations can express any expressible computational
        effect, including exceptions and mutable state. ... The
        limited expressiveness of undelimited continuations has been
        proven by Hayo Thielecke, see the reference and the abstract
        below.

        http://okmij.org/ftp/continuations/undelimited.html#delim-vs-undelim

Oleg's web site okmij.org is a trasure trove of fascinating reading,
and I recommend it for everyone.