Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_execute.c zend_language_parser.y zend_language_scanner.l
zend_operators.c zend_operators.h

From: Date: Tue, 06 Aug 2002 16:07:31 +0000
Subject: Re: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / zend_compile.c zend_compile.h zend_execute.c zend_language_parser.y zend_language_scanner.l
zend_operators.c zend_operators.h
References: 1 2 3 4 5 6 7  Groups: php.dev 
Request: Send a blank email to php-dev+get-86573@lists.php.net to get a copy of this message
Personally I think making it work with classes only is good enough. Other types have existing ways to check for them. It'd be good if we could reach some kind of consensus :) Andi At 01:23 PM 8/5/2002 +0300, Zeev Suraski wrote:
FWIW, I really don't see why we should get into this mess when the advantage over gettype() is not very clear. At 07:04 05/08/2002, Andi Gutmans wrote:
At 03:35 PM 8/4/2002 -0400, Andrei Zmievski wrote:
On Sat, 03 Aug 2002, Andi Gutmans wrote:
Don't you think we should have a unified way of testing for variable's type/class? I understand that we don't have type unification yet, but having a separate function for each basic type is kind of ugly too.
I'd prefer "is" to be an OOP only construct. i.e. for anything other than an object it'd return false. Just some food for though before we finalize this. This operator will
be a
reserved word. Are we sure we want "is" to be a reserved word? It
might be
used quite a bit.
I think it's fine to use is as reserved. Other languages (C# for example) uses 'is' for this purpose. By the way, if you don't like casting notation, Alan had an idea to use this one: $a is 'int' $a is 'Foo::Bar' Would that work?
Nope doesn't work for me. I don't see a reason why to start doing all kinds of weird stuff when we have rules for Foo::Bar. Classes shouldn't look different in an "is" statement than in a "catch" statement IMO. Andi -- PHP Development Mailing List <http://www.php.net/> To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.dev (#86573) next »