Grant Rettke <[email protected]> writes: > On Tue, May 19, 2009 at 8:19 PM, Eduardo Cavazos <[email protected]> > wrote: >> Moving set-car! and set-cdr! seems to be a "writing on the >> wall" gesture; shape of things to come. > > Here is the writing: > > http://www.r6rs.org/final/html/r6rs-rationale/r6rs-rationale-Z-H-29.html#node_chap_27
This part of the rationale is nonsense: "[...] This facilitates statically determining if a program ever mutates pairs," In order to determine that (rnrs mutable-pairs) is never used, you need to determine that it is never used by any of the libraries a program uses, or that may be used at a later time (e.g. via eval or load). This is called global program analysis. Once you go to this level, it's no harder to simply statically determine if set-car! or set-cdr! are ever referenced. So there's no way this can be any help to the compiler writer, and the real rationale is what follows: "[...] encourages writing programs that do not mutate pairs, and may help deprecating or removing mutable pairs in the future." i.e. it is indeed just a "writing on the wall" gesture. -- Alex
