On Tue, 19 Nov 2002, Marcus Börger wrote:

> The link below contain a patch that allows abstract functions in ZE2.
> http://marcus-boerger.de/php/ext/ze2
> 
> abstract [static] function '(' parameters ')' ';'
> 
> it would be possible to make the ';' optional.
> 
> When an abstract method is called a fatal error is generated and
> execution stops. Another way of handling abstract would be to
> generate an E_WARNING or throw an exception. I experimented
> with the second one already but do not like it. I favor the first
> over the third but haven't tried that yet.
> 
> The thinks i did:
> introduce T_ABSTRACT = "abstract" and modified the parser.
> added is_abstract after is_static in zend_function (and such)
> emit an E_ERROR when is_abstract is set in 
> zend_init_static_method_call_handler & zend_init_method_call_handler
> 
> marcus

I like "abstract", it provides a good alternative to interfaces.  If we
make it interact right with aggregate and overloaded objects, we're
starting to have a very powerful OO platform, even for the Java buffs. :)

We need to figure out what happens with abstract methods if the object
aggregates a class that defines this method, and if/how __call should be
invoked if you try calling an abstract method (instead of just bailing out
with E_ERROR).

Andi and I agreed on how we wanted aggregate to work in Frankfurt, I'll 
write another followup tomorrow describing our conclusions on that and 
more in detail the problems we must solve related to "abstract" (too busy 
tonight).

 - Stig


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to