Lists/Maps/Sets (Was Re: The story of E, part 2 (fwd))

Chip Morningstar chip@communities.com
Thu, 15 Oct 1998 11:51:41 -0700 (PDT)


>Ok, if no one has any good objections, I'm happy with 
>
>
>"snapshot" vs "revise", and
>
>             |        Table     	     List
>  -----------+------------------------------
>   immutable |   FinalTable     	FinalList
>             |
>    mutable  |   DraftTable       	DraftList
>
>
>"If you've got a table/list/foo that's like something you want, to revise
>you edit a draft, until a snapshot of your draft is a good final version."
>
>	Metaphors by the dozen,

OK, I'll object.

Consider for a moment why someone would use a mutable data structure.
All the reasons I can think of have something to do with efficiency,
or, at least, the perception of efficiency.

In cases where the perception is inaccurate (presumably because we
have done a really good job implementing our immutable data structure
abstractions), what is needed is education -- and you don't need to
have a label for the mutable classes because they won't be part of
this universe.

In cases where the perception is accurate (e.g., large databases being
accessed over the net), your terminology should reflect actual use.
Mutable does not imply tentative or unfinished, as "draft" does; it
merely reflects an expectation that the content of the data structure
will vary over time.

Metaphors by with you,
Chip

----------------------------------------------------------------------------
  Chip Morningstar                                    Electric Communities
  chip@communities.com             10101 N.DeAnza Blvd, Cupertino CA 95014
  http://www.communities.com/people/chip                      408-342-9522

	      "It's now safe to turn off your computer."
----------------------------------------------------------------------------