RE: [PHP4BETA] A strict equality operator
| From: | Zeev Suraski | Date: | Tue, 27 Jul 1999 00:11:44 +0000 |
| Subject: | RE: [PHP4BETA] A strict equality operator | ||
| References: | 1 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-2825@lists.php.net to get a copy of this message | ||
I don't think there's a need for >< in there, perhaps there's room for a not-strictly equal, which would be =!=, probably.
I don't know. [=] suggests assignment since it resembles = and not ==. I think that taking the equality operator, ==, and adding to it, rather than completely changing it, makes more sense.
Zeev
At 01:00 27/07/99 , Brian Schaffner wrote:
would be a good thing to start them now... I also find it difficult to relate to the old fortran days :) fortran - what's that? ;-) I think that if we try to put things in order, we basically have the =~= / =:= approach, and the [=] approach I personally think that visually, [=] doesn't look right since it looks just like an array offset, and in a way, as an expression in itself (enclosed by parentheses). It could be just me though. I think I like =~= best. i like having the equals on the inside because it will allow us to add less than, greater than, and not equals in the future (or whenever). i also like the visual of [=] because it focuses the attention on the equals rather than obfuscating the code (as I feel =~= does). here's some code to illustrate these: if ($zeev [=] $andi) ... if ($jim =~= $rasmus + $caffeine) ... while ($php3[$n] [<] $php4[$n]) ... yuck - how do we handle !=== ? is it !=~!= or =!~= ? of course: if ($zeev->choice [!=] "[=]") ...-- Zeev Suraski <zeev@zend.com> http://www.zend.com/ For a PGP public key, finger bourbon@netvision.net.il^^^hrmm... what does the parser think about that space? for ($i = 0; $i !=:= count($developers); $i++) ... if ($i <:< $j) ... if ($deadhorse =:= $beat_to_death) exit; i would assume that the <, >, and != should all be part of this. this assumption is based on another assumption that these expressions should be quicker than the standard =, <, >, != because no type conversion is necessary before the comparison. -brian- -- PHP 4 Beta