Markus wrote:

> If (as you said elsewhere) you are wanting something "fairly fundamental
> to the language" these are exactly the sorts of things you should give
> thought to.  I've been pondering it on and off today (while shopping
> with my wife) and I can't see an unambiguous "least surprise" way to
> implement something like this.

Quite right.

> The main problem is that hashes, queues, maps, sets, arrays, etc. each
> provide a one of the semantically clean ways of answering the questions
> "what does it mean when I do..."; if none of these meet your needs, it's
> fairly likely that either: 1) you are looking for a linked combination
> of two or more well-defined collection classes, or 2) what you are
> looking for isn't semantically clean.

I'm not convinced yet that what I want is not semantically clean.

> The syntax question (=>, etc.) is secondary.  It's not at all a good
> idea to provide syntactic sugar to invoke cluttered semantics.  

True, but that is a relative term. :) We shall see.

> If you had your class, what would you expect the output (and/or error
> message) to be for....

[snip very useful list]

I won't address this today, but I will save this list.

Actually I hadn't any intention of an RCR for another few weeks. (Sorry,
but I am a very slow thinker sometimes.)

Of course, if my general idea is shown to my satisfaction to be nonsense,
I will not submit an RCR at all. But if I still believe in it, I will submit
later.

> 
> My guess is that either++ 1) you will find in answering these questions
> that you are really wanting a simple combination of two standard
> collections, or 2) you will get tangled in trying to come up with
> something consistent, or 3) I will learn something interesting.
> 

I fear 1 or 2, but I hope for 3. ;)

In any case, your posts have been extremely valuable to me.


Thanks,
Hal