==, is

Jonathan M Davis jmdavisProg at gmx.com
Mon Nov 15 12:35:33 PST 2010


On Monday 15 November 2010 11:47:11 Steven Schveighoffer wrote:
> On Mon, 15 Nov 2010 14:36:33 -0500, Ellery Newcomer
> 
> <ellery-newcomer at utulsa.edu> wrote:
> > parser definitely does it for !in, but it doesn't for the other ones,
> > and I didn't want to go digging all over the place for it.
> > 
> > Also, spec says yes for !in, but is silent for the other ones
> 
> http://www.digitalmars.com/d/2.0/operatoroverloading.html#equals
> 
> As far as is, it doesn't explicitly say that rewriting is done, but, it
> does spell out that to do the opposite, use !is.  Maybe the spec should be
> updated to explicitly say x !is y is the same as !(x is y).

Honestly, I don't see how it could be otherwise. I would have just assumed that 
they were identical.

- Jonathan M Davis


More information about the Digitalmars-d-learn mailing list