Am I getting this all right?

Bill Baxter dnewsgroup at billbaxter.com
Thu Dec 14 18:01:55 PST 2006


Jarrett Billingsley wrote:
> "Bill Baxter" <dnewsgroup at billbaxter.com> wrote in message 
> news:elsv06$r2e$1 at digitaldaemon.com...
> 
>> Hmm.  Ok, so you really do want to use foreach(...; set) if at all 
>> possible.
>>
>> Sure would be nice if there were a .keyiter that could be used with 
>> foreach that was efficient and didn't require allocations.
> 
> Meh, I don't think the
> 
> foreach(key, ____; set)
>     ...
> 
> Is that bad.  Maybe it's a little unclear, but as far as efficiency goes, 
> it's just passing the extra unused value parameter.

I guess not.  Might be interesting if AA's allowed a void value type.

   void[int] myset;

Hmm... maybe not.


> 
>> Too bad the iterator discussions fizzled out without anything getting 
>> decided.
> 
> Yeah.  We didn't start a three-week four-hundred-post thread about it, so I 
> guess Walter didn't consider it important. 

:-)  But it was almost that long wasn't it?  And Walter was one of the 
the ones that kicked it off, IIRC.  So I had high hopes something would 
come of it.

--bb


More information about the Digitalmars-d-learn mailing list