digitalmars.D - foo == null should be a compile-time error
- Piotr Fusik (4/4) May 18 2005 Someone here argued that foo.opEquals(null) could return a sensible valu...
- Ben Hinkle (4/8) May 18 2005 In case you weren't aware, this topic has come up a few times recently -...
- Piotr Fusik (2/4) May 20 2005 I don't feel enough patient to read that thread. Could you please tell m...
- Ben Hinkle (7/14) May 20 2005 I lost track of it fairly quickly I'm afraid... but then I came to accep...
Someone here argued that foo.opEquals(null) could return a sensible value. I cannot agree with that, since people expect that a==b iff b==a. null == foo never returns true or false, so foo == null shouldn't either. The same applies to foo != null.
May 18 2005
"Piotr Fusik" <Piotr_member pathlink.com> wrote in message news:d6f4j7$1udh$1 digitaldaemon.com...Someone here argued that foo.opEquals(null) could return a sensible value. I cannot agree with that, since people expect that a==b iff b==a. null == foo never returns true or false, so foo == null shouldn't either. The same applies to foo != null.In case you weren't aware, this topic has come up a few times recently - I think Kris's thread kicked off lots of discussion about it.
May 18 2005
In case you weren't aware, this topic has come up a few times recently - I think Kris's thread kicked off lots of discussion about it.I don't feel enough patient to read that thread. Could you please tell me what's the final conclusion?
May 20 2005
"Piotr Fusik" <Piotr_member pathlink.com> wrote in message news:d6kaeb$jqe$1 digitaldaemon.com...I lost track of it fairly quickly I'm afraid... but then I came to accept foo==null behavior a while ago so the topic didn't hold my interest. The archives have more discussions about ==null so that latest thread might not be the best place to start. Basically some people think it should be an error, some people don't. discuss... (or not...)In case you weren't aware, this topic has come up a few times recently - I think Kris's thread kicked off lots of discussion about it.I don't feel enough patient to read that thread. Could you please tell me what's the final conclusion?
May 20 2005