Kon Lovett scripsit: > Hash-Consing?
Permitted but not required, as I say. > You are suggesting contagion. I use this in the 'procedure-surface' > composite for example. Yes. However, there are alternative policies, like contagion towards mutability (mutable unless all are immutable) and others. > >Scheme would need new procedures MUTABLE-PAIR?, IMMUTABLE-PAIR?, > >IMMUTABLE-CONS, IMMUTABLE-LIST, MUTABLE->IMMUTABLE, and > >IMMUTABLE->MUTABLE. > > Mutable vs. Immutable should be a property of the object. Sorry, but > I don't think we need *-immutable versions of every (<proc> > <datatype> ...). Just a built-in flag and exception when a mutating > operation attempted. I think we're in agreement. IMMUTABLE->MUTABLE and its opposite would take either a list or a tree (to be decided) of one type and reconstruct it using conses of the other type. Otherwise, we just need the basic constructors CONS and LIST and some new discriminators. -- Income tax, if I may be pardoned for saying so, John Cowan is a tax on income. --Lord Macnaghten (1901) [EMAIL PROTECTED] _______________________________________________ Chicken-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/chicken-users
