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

a (revised) draft of R5RS



   Date: Wed, 19 Mar 1997 14:23:12 -0500
   From: Matthias Blume <blume@CS.Princeton.EDU>

   Maybe it has something to do with the Scheme crowd, but I still don't
   understand why a not-so-silly consideration is being ridiculed ...

I'm just trying to keep the discussion "relevant" by showing examples of
practice.  But since we're arguing over the relevance of relevance, perhaps
relevant examples were mis-placed.

   I only said that system resources other than memory should be managed in
   an analogous way -- to maintain the illusion of unlimited supply. 

It's not just about supply.  It's about "publication".  The act of writing
a file is not just an issue of resource-maintenance but also one of 
resource-synchronization.  When I ask for an object to be consed in Scheme,
I can know I've got a new one.  And I don't accidentally reuse an existing
one.  But in the real world, with I/O to external things, the mechanisms for
synchronization ARE open/close.  You get "that file is locked" errors when
someone has something open and you need to be able to control when that 
starts and stops.  A better example to compare it to would not be GC but 
critical sections in code--one needs some way to control them, and various
mechanisms are proposed when we talk parallelism -- but one of the suggestions
is almost never "just don't worry about it--it's an efficiency issue".
We know that when two people collide on such resources, the clash is managed
only by negotiation or assertion of right--never by magic.  Same with files.

   I never said that one has to wait until the system runs out of memory to
   get file descriptors back.  How does one do that?  I don't exactly
   know. Maybe there is a research topic in here somewhere.

   Anyway, I don't buy the efficiency vs. semantics argument, because the
   problems with semantics arise only with dynamic-wind or
   unwind-protect, both of which I do not consider important, necessary,
   or desirable.

To me it's funny that you think it unimportant because the only time it ever
causes a semantic problem if someone does a non-local exit is when someone
tries to make the behavior of non-local exits semantically clear.  That's all
the wind/unwind functions do is assert important things that need to be kept
clear during exit excursions--why should it be a surprise that when you
haven't given enough information in the exit that the thing which is trying to
make sense of your attempt to exit would get confused?

   Let me stop here before I get ridiculed further.

You are not being ridiculed.  (Your idea maybe a little, but then I
felt you had ridiculed mine, too, and mostly I think it's better to err
on the side of allowing people to explore even whimsy implications of others'
ideas rather than say no one should do that for fear it might hurt someone.)
But no personal affront was intended if you felt one--and I'm sorry if you did.
In my own way, I was just trying to keep the discussion light... :-)
 -kmp