-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 01/04/2013 03:42 PM, John Cowan wrote: > Andy Wingo quotavit: > >> In retrospect, we can also see that some aspects of the initial >> design of Scheme were flat-out wrong ... [We] believe that Carl >> Hewitt was right: we would have been better off to have introduced >> cells as a separate, primitive kind of object, rather than allowing >> assignment to any and every λ-bound variable. > > I've made that point too, but it's also been pointed out (I forget > by whom) that mutable variables, unlike cells, can't escape their > context, and that this is often a Good Thing: the mutability stays > chained to specific procedures. Even if you are not willing to pay > the implementation price for direct support of mutable variables, and > always transform them into cells anyway, certain kinds of source-level > correctness are easier to establish when you know which parts of the > program are pure. >
Hrm. Given that you can make cells out of mutable variables (with closures), but that cells can't let you recreate the effect of "(define set! ...)" in a language where variables are immutable, I'd have thought that explicit cells let the compiler establish more properties of programs than mutable variables! With cells, you can still establish which parts of the program are pure - the parts that don't refer to cell access/mutation procedures. ABS - -- Alaric Snell-Pym http://www.snell-pym.org.uk/alaric/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAlDnA5EACgkQRgz/WHNxCGqbZACgggIQqf6HyHHhyfJ8yg9SdLd1 iDEAoIebYPCuRR40PXrvRTTu2mBsdRax =iegq -----END PGP SIGNATURE----- _______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
