Ivan Shmakov scripsit: > >> Maybe this could be addressed by splitting the "scheme" module of > >> chicken into a "scheme-pure" for the sake of safety, > >> "scheme-mutations" having the rest and make "scheme" importing and > >> reexporting both sets of bindings. > > That’s what the Racket folks did: they have their own Scheme > dialect without mutable pairs, and they have the “standard” > Scheme(s) available as an option.
R6RS does what Daniel suggests, splitting at the module level only: set-car! and set-cdr! are in a separate module, and if it's not imported anywhere you know all pairs are functional, but there is only one species of pairs. Racket makes normal pairs functional, and provides a separate data structure, not interoperable with pairs, which is mutable. That means if you are going to mutate anything, you have to potentially change all your code to use mpairs instead of pairs, and duplicate it for parts that should work on pairs. IMHO not a win. Then again, though Racket supports R5RS and R6RS for backward compatibility, the Racketfolk consider their language a descendant of (or successor to) Scheme rather than a variety of Scheme. Forward compatibility doesn't interest them. -- He made the Legislature meet at one-horse John Cowan tank-towns out in the alfalfa belt, so that [email protected] hardly nobody could get there and most of http://www.ccil.org/~cowan the leaders would stay home and let him go --H.L. Mencken's to work and do things as he pleased. Declaration of Independence _______________________________________________ Chicken-users mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-users
