ZE2 + public/protected/private/final

From: Date: Mon, 25 Nov 2002 17:10:24 +0000
Subject: ZE2 + public/protected/private/final
Groups: php.dev 
Request: Send a blank email to php-dev+get-91527@lists.php.net to get a copy of this message
After Andi had commited some cleanups my version from PPP is a bit smaller. My version is of cause only my private idea of implementing PPP. The solution i went on has some advantages and disadvantages. One of the disadvantage is that i do not allow redeclaring of private member functions. On the other hand and from my current perspective this should allow a faster implementation. But especially here i would appreciate every hint for alternatives. Besides public/protected/private i introduced final which is available as a smaller patch without public/protected/private stuff. Final can be used if you do not want anybody to modify (overload) one of your methods. The implementation is very simple since only one new keyword "final" is used which can be stored in fn_flags of methods. While inheriting there needs to be one additional check: A final function cannot be redeclared. And i added two compiler errors in the language parser to have better messages when someone tries to declare a method final and abstract. The main disadvantage here is that final needs the a keyword. You can download updated patches and test files here: http://marcus-boerger.de/php/ext/ze2 Comments welcome !!!

« previous php.dev (#91527) next »