Side-effect free containers for E
Fri, 11 Aug 2000 08:53:25 -0400
> makes is compelling. The problem is not created simply by
> the existence of
> mutable containers. I pushed us over the cliff when I
> designed the mutable
> and immutable containers to share so much protocol, and
> therefore, to be so
> interchangeable with each other. As a result, if a mutable
> container is
> accidentally used where an immutable one should have been
> used, the program
> will often still work under benign and common conditions --
> as when neither
> side mutates the container.
You also made the same mistake when you decided to make sets the same
type as maps. I've found that I often design services where I let
client code choose which capability to use in performing the service
by exposing the keys in a (key => cap) map. If I forget to mask off
the values before passing out the container, I would leak all the
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.