[plt-scheme] mutable lists/dicts?

From: Carl Eastlund (carl.eastlund at gmail.com)
Date: Sat Apr 10 09:47:09 EDT 2010

On Sat, Apr 10, 2010 at 9:44 AM, Eric Tanter <etanter at dcc.uchile.cl> wrote:
>>>> (dict? (mlist (mlist 1 2) (mlist 1 2)))
>>> #f
>>  ^^^
>>
>> Mutable lists are not dictionaries.
>
> well, yes, I understood that what's #f tell me here.

Okay, sorry, I misunderstood your question.

> But it doesn't really match the documentation on dictionaries (3.15). It's just said there that lists are dictionaries, and that then you have a predicate to test wether a dictionary is mutable. The question is, why aren't mutable lists dictionaries, and even more precisely, mutable dictionaries?
>
> Even if I don't get the reason why, it may be good to state it in the doc.
>
> -- Éric

Yeah, I see how that could be confusing.  Mutable lists aren't lists
-- we didn't want to call them "immutable lists" at every occurrence,
but when we say "list", we only mean the immutable ones, these days.

I'm not sure why mutable lists aren't dictionaries, though.

--Carl


Posted on the users mailing list.