Re: Continuations in Common Lisp (with apologies)
From: William D Clinger (cesuraSPAM_at_verizon.net)
Date: 02/11/05
- Next message: Trent Buck: "Re: Where you can you go with Lisp?"
- Previous message: rsheridan6_at_gmail.com: "Re: Where you can you go with Lisp?"
- In reply to: Robert Marlow: "Re: Continuations in Common Lisp (with apologies)"
- Next in thread: Kent M Pitman: "Re: Continuations in Common Lisp (with apologies)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Next message: Trent Buck: "Re: Where you can you go with Lisp?"
- Previous message: rsheridan6_at_gmail.com: "Re: Where you can you go with Lisp?"
- In reply to: Robert Marlow: "Re: Continuations in Common Lisp (with apologies)"
- Next in thread: Kent M Pitman: "Re: Continuations in Common Lisp (with apologies)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|