what's the semantics of 'varX is varY', in particular `strX is strY`?

mw mingwu at gmail.com
Wed Aug 5 17:29:09 UTC 2020

I've thought it's compare by reference, as in e.g. `assert(obj 
!is null)`


   string strX = "2020-07-29";
   string strY = "2020-07-29";
   string strZ = "2020-07-30";
   assert(strX !is strY);  // assertion failed
   assert(strX !is strZ);  // assertion pass

so here `is` means compare strings by their contents? where is 
the exact definition of the  semantics of 'varX is varY'?

BTW, on page:


`is` directly link to:


which only talks about is(expr), not 'varX is varY'


More information about the Digitalmars-d mailing list