[R6RS] Zapping SET-CAR! & SET-CDR!
Sun Oct 10 16:06:14 EDT 2004
While I'm waiting for some of the details in Manuel's, Richard's and my
discussion on modules to firm up, I thought it might make sense to
continue this discussion.
I propose we remove SET-CAR! and SET-CDR! from the language, thereby
making all pairs immutable.
The advantages are many and hopefully clear to everyone here---among
- they're really redundant, given that vectors are mutable
- unpleasant consequences of their presence for argument lists go away
- a lot of code out there will get cleaner
Disadvantages: Lots (and lots) of code will break. However, a
majority of those polled at the workshop were for ditching them.
- Should mutable pairs be provided as part of some R5RS compatibility
library, as we're envisioning for arithmetic? (And should those
pairs be interchangeable with R6RS immutable pairs when it comes to
applying one or the other CAR, say.)
- Many programs that presently use SET-CAR! & SET-CDR! presumable
would switch to using cells inside the pairs. Should R6RS therefore
offer a default cell data type? (There seemed to be a consensus
that there shouldn't, but the rationale is unclear to me.)
Cheers =8-} Mike
Friede, V?lkerverst?ndigung und ?berhaupt blabla
More information about the R6RS