RE: [PHP4BETA] A strict equality operator

From: Date: Mon, 26 Jul 1999 10:38:09 +0000
Subject: RE: [PHP4BETA] A strict equality operator
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-2757@lists.php.net to get a copy of this message
First of all, I have a headache and I'm not thinking very clearly ;) After wading through all of the other thoughts. I'll have to add my useless bit of knowledge. I like the "===" idea, but, it does seem like a disaster waiting to happen. There aren't any characters other than = which seem to make any logical sense to me for this particular operator. Is there a reason it would have to be the "=?=" sequence? Would "?==" be workable? What I'm thinking, and it may be totally whacked in reality, is that it might be useful to emulate the features of ?= with ?== being non type converting. (Just as a note: I haven't a clue how the parser deals with this stuff, never needed to look.) ===, +==, !==, &==, etc. ===, =+=, =!=, =&=, etc might make more sense parser-wise, though. Although my ideas don't solve the "===" sucks consensus, I don't know that anything else makes logical sense. I can't argue that it is hard to read, hard to type, hard to debug, hard to... Could there be a warning message like the PHP 3.x "+" concatenation operator placed in a log file? That might solve the debugging issue a bit. ,David Norris World Wide Web - http://www.geocities.com/CapeCanaveral/Lab/1652/ Home Computer - http://illusionary.tzo.cc/ Page via mail - 412039@pager.mirabilis.com ICQ Universal Internet Number - 412039 E-Mail - kg9ae@geocities.com -----Original Message----- From: Andi Gutmans [mailto:andi@zend.com] Sent: Sunday, July 25, 1999 3:56 PM To: php4beta@lists.php.net Subject: [PHP4BETA] A strict equality operator Hi. Zeev and I want to add a strict equality operator that will not do any type conversion and will only be true if both the type of the arguments and their values are identical. Does anyone see any problems with this? We thought of using === as the operator. Comments? Andi --- Andi Gutmans <andi@zend.com> http://www.zend.com/ -- PHP 4 Beta

« previous php.version4 (#2757) next »