Re: [PHP4BETA] A strict equality operator

From: Date: Sun, 25 Jul 1999 21:17:44 +0000
Subject: Re: [PHP4BETA] A strict equality operator
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2724@lists.php.net to get a copy of this message
On Sun, 25 Jul 1999, Ariel wrote: > On Sun, 25 Jul 1999, Jeffrey Galbraith wrote: > > > I've seen to many problems with the triple equality operator in the past. > > How about := (colon equal)? This makes it more explicit and easier to > > interpret. For instance, looking at another developer's code, sometime you > > have to wonder if they meant to add === as opposed to ==. The := makes it > > easier to decipher. > > := means assignment is a large number of languages, plus in mathamtics, so > it's not a good choice. > > I agree that === is unwildly, since == and === in many cases will work the > same, so it would not be an easy bug to spot. It should be something very > different. $= is my suggestion. If we can't use "===", my suggestion is that it is made less cryptic, for example "eq". Cryptic ones like "!=" etc. are ok because other languages have paved way for them, but I don't think I have ever seen "$=". Short version: "===" or "eq" - Stig

« previous php.version4 (#2724) next »