Re: about final methods and attributes

From: Date: Sat, 21 Jun 2003 22:20:38 +0000
Subject: Re: about final methods and attributes
References: 1 2 3  Groups: php.internals 
Request: Send a blank email to internals+get-2513@lists.php.net to get a copy of this message
To be quite honest, I don't see a need for final classes. Talking from my experience, classes which are designed to be final, often end up being inherited from at some point or another. This happened to me quite often in C++ when taking other people's/company's code and required fixing their source code. However, if you guys think it will help you I don't really mind adding it. At least for consistency sake even though I think it's useless :) So as far as I'm concerned you can go ahead and commit it. But I still think it's better not to use it in the long run :P Andi At 09:08 PM 6/21/2003 +0200, Marcus Börger wrote:
Hello Cristiano, Saturday, June 21, 2003, 2:07:09 AM, you wrote: MB> Hello Cristiano, MB> Friday, June 20, 2003, 9:03:33 PM, you wrote: CD>> Ok, final methods and attributes are cool, but what about final classes ? CD>> Is it hard to implement ? Or all classes must be able to be extended by CD>> children ? MB> It would be easy to implement and i made a running patch some time back. But MB> we were uncertain about the result, whether or not it is really helpfull and MB> needed in a loose typed language as PHP. But if you come up with a very good MB> scenario were final classes are really needed chances are good they make it MB> into PHP 5, if not chances are not so good. Attached is a patch that allows final classes. -- Best regards,
 Marcus                            mailto:helly@php.net


« previous php.internals (#2513) next »