defining "in" What is the proper way in D2?
Jonathan M Davis
jmdavisProg at gmx.com
Mon Sep 12 09:58:34 PDT 2011
On Monday, September 12, 2011 17:23:36 Timon Gehr wrote:
> On 09/12/2011 05:16 PM, Steven Schveighoffer wrote:
> > I'd say the array had to be a literal, or guaranteed sorted to support
> > in. I'm not sure that's a great thing.
> >
> > But in order to do all this, we have to consider that a *lot* of code
> > relies on a in AA returning a pointer.
>
> What code? I think many people don't notice that it returns a pointer,
> because they expect it to return bool.
The documentation is quite clear that in returns a pointer which is null if
the item isn't there, so there's going to be code that relies on that fact.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list