Re: Continuations in Common Lisp (with apologies)

From: William D Clinger (cesuraSPAM_at_verizon.net)
Date: 02/11/05


Date: 11 Feb 2005 08:50:37 -0800

Robert Marlow wrote:
> I can't pick which response to Peter you're talking about.

The one with the URLs for papers at http://readscheme.org/

> If you're talking about redefinition of standard scheme procedures
> to cater for control structures, how can you redefine such that
> users can happily use libraries using unwind-protect and full
> continuations without ever having to worry about errors relating
> to their use together?

I said a few words about this in my response to Peter.
I could go into more detail, but I think it makes more
sense to refer you to the paper by Gasbichler et al
that I cited in my response to Peter:

http://repository.readscheme.org/ftp/papers/sw2003/Threads.pdf

That paper is an excellent summary of the state of the
art. For more information on specific issues, you can
track down the references cited in the relevant sections
of that paper.

> If unwind-protect solutions in portable scheme are so elegant,
> why isn't there a with-open-file equivalent in scheme? Instead
> there's call-with-input-file which doesn't guarantee the file
> is closed and with-input-from-file which looks like it may or
> may not succeed in intelligently closing the file depending on
> the implementation (despite solid solutions allegedly being
> available portably).

No one is happy with Scheme's standard i/o procedures.
Gary Brooks and I designed them in 1984, long before
DYNAMIC-WIND was added to the language. The problems
you identify came about because several MIT people
argued for the MIT semantics, in which a file would be
closed during the unwind, and reopened at the same place
on the wind. Gary and I were skeptical, but the MIT
people had more implementation experience and a much
larger user base at that time, so we compromised with
a spec that allowed the MIT semantics (for the WITH-
constructs) without requiring it (for either set).

The MIT people later concluded they were wrong, but by
then it was very difficult for the Scheme authors to
approve any changes to the language. Change required
consensus, which was interpreted as unanimity. Imagine
trying to get Kent Pitman and me to agree on a proposed
change, and then imagine having to get the agreement
from twenty other strong-minded and opinionated people.
More language problems went unfixed because of this
political problem than went unfixed because of technical
issues.

In that political climate, this particular i/o problem
was regarded as relatively low priority because the more
sensible behavior could be synthesized using DYNAMIC-WIND
and the lowest-level OPEN-{INPUT,OUTPUT}-FILE and
CLOSE-{INPUT,OUTPUT}-PORT. The fact that there was no
portable way to delete a file, and therefore no reliable
way to open an output file that might already exist, was
an even more serious problem, and we were never able to
fix even that.

These are the kinds of political problems that killed the
"Scheme authors" process, and darn near killed Scheme as
well.

Will



Relevant Pages

  • Re: House of M #5 (Possible Spoilers)
    ... >>> Wolverine or the Hulk or Namor or even Captain America to kill somebody ... > basic premise is that the greatest heroes of the Marvel Universe have ... And their first response is to kill the ... it would probably sound similar to what Peter ...
    (rec.arts.comics.marvel.universe)
  • Re: Halting Problem for Humans
    ... But I think it is quite different for humans; ... Daryl McCullough wrote: ... your questions to Peter and Daryl are not. ... Will Peter's response to string S be "no"? ...
    (sci.logic)
  • 3629 Jez St
    ... resign warnings now or Peter will evidently fish them from time to time you. ... reluctantly cleared depending on the collection. ... struggle me aging in response to your productive commerce. ...
    (sci.crypt)
  • Re: Adultery and Sin
    ... Ken bears some of the responsibility even though Peter didn't ... *have* to be upset at it. ... Why should he have been able to predict Peter's response, ... bullshit you, or I may just be bullshitting you inadvertently." ...
    (uk.religion.christian)
  • Re: Systemwiederherstellung nur für letzten Monat aktiv
    ... mit 34 GB gefüllt. ... Peter ... Prev by Date: ...
    (microsoft.public.de.german.windowsxp.sonstiges)