Comparing pointers with "is"

bearophile bearophileHUGS at lycos.com
Mon Aug 27 09:33:45 PDT 2012


monarch_dodra:

> Either that, or is it considered "best practice" to use "is" to 
> compare pointers,

For two pointers using "==" or "is" is the same. And I don't 
remember "best practices" about this. If your pointers later risk 
becoming class references, then it's better to use "is".

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list