[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] R6RS immutable pair
From: |
John Cowan |
Subject: |
Re: [Chicken-users] R6RS immutable pair |
Date: |
Thu, 13 Jul 2006 00:41:24 -0400 |
User-agent: |
Mutt/1.3.28i |
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) address@hidden