The in operator and normal arrays

Vladimir Panteleev thecybershadow at gmail.com
Thu Apr 26 20:05:56 PDT 2007


On Thu, 26 Apr 2007 03:09:46 +0300, Myron Alexander <consulting at myron.RMVETHISalexander.com> wrote:

> I suspected as much. Thanks for the info. I add my voice of support for
> the proposal to expand the in operator to operate on normal arrays.

Or, better yet, just get fully-working sets (like dynamic arrays but without values). Declared like void[datatype], you could do the same operations as with AA (in, .remove, foreach, etc.), plus .add(element) (the AA syntax won't work here). These would work much faster anyway, at the cost of preserving a certain order and having at most one instance of an element at a time.

-- 
Best regards,
  Vladimir                          mailto:thecybershadow at gmail.com



More information about the Digitalmars-d mailing list