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: | Andrei Zmievski | Date: | Sun, 04 Aug 2002 19:35:35 +0000 |
| Subject: | 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 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-86518@lists.php.net to get a copy of this message | ||
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?
-Andrei http://www.gravitonic.com/
Complexity in the mind is not caused by learning;
learning is caused by complexity in the mind.
-- Steven Pinker