[r6rs-discuss] Laziness Features
I am posting this as an individual member of the Scheme
community. I am not speaking for the R6RS editors.
John Cowan wrote:
> Implementing the mutable-pairs library will require changes to the
> core implementation, in the case of an implementation which does not
> support mutable pairs unless the library is included.
One of the more interesting properties of the draft R6RS
is that every program consists of a script together with
the libraries that it uses; furthermore an implementation
of the draft R6RS can identify all of the libraries that
a program uses before it begins to compile or to execute
any of the code that is contained within those libraries.
At the very beginning of program execution or compilation,
therefore, an implementation of the draft R6RS can select
between a library that provides and uses mutable pairs and
one that does not.
That is more practical than it sounds, because the list of
procedures whose implementation might be influenced by the
mutability of pairs is pretty short, and it should be no
big deal to pre-compile two versions of the proto-libraries
that contain only those procedures. Furthermore the
compiler optimizations that are likely to be affected by
the mutability of pairs can be controlled by a very small
number of entries in one of the compiler's tables.
I doubt whether it would be so easy for an implementation
to conditionalize itself on implicit forcing of promises.
Since few (if any) systems provide implicit forcing anyway,
the argument for mentioning implicit forcing within the
R6RS seems much weaker than the argument for mentioning
the possibility of mutable pairs.
That said, I wouldn't shed any tears if mutable pairs were
to disappear entirely from the R6RS.
Will
Received on Mon Oct 16 2006 - 19:48:05 UTC
This archive was generated by hypermail 2.3.0
: Wed Oct 23 2024 - 09:15:01 UTC