Re: [PHP4BETA] A strict equality operator

From: Date: Sun, 25 Jul 1999 22:49:33 +0000
Subject: Re: [PHP4BETA] A strict equality operator
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2733@lists.php.net to get a copy of this message
On Mon, 26 Jul 1999, Zeev Suraski wrote: > At 00:07 26/07/99 , Ariel wrote: > >It's not any harder to remember then === or harder to understand, but a > >lot better from a debugging point of view since you're much less likely to > >confuse it with == (=$ might be better). I'm not hooked on the symbol, I > >just don't like === there are already a lot of people who think == and = > >were a mistake for c, and that they should have done = and := instead, so > >why make it worse (ok so == works well with && vs & and || vs |, but it > >still causes a lot of mistakes for programmers). How about x= it stands > >for exactly equal. > > Perhaps something along the lines of =?=, ? being some good character to > fit in there. I like this idea! > =~= > =x= (seems to suggest an X over the equality, which appears > not-equal) > =:= =:= gets my vote, and I like =!= for not equal since ! already is not (!=:= would also work? :) <:> for not equal? Do add a : to the operator to make it strict? That way :> would mean greater, but only when both sides are numbers. And =:> etc. But if so, : doesn't seem like a good character, since =:< looks like a sad clown :-) If you will extend the syntax, then ~ seems like a good character to me. Just seculating here... -Ariel

« previous php.version4 (#2733) next »