Re: Re: new overloading feature?
| From: | Lukas Smith | Date: | Mon, 09 May 2005 20:36:33 +0000 |
| Subject: | Re: Re: new overloading feature? | ||
| References: | 1 2 3 | Groups: | php.internals |
| Request: | Send a blank email to internals+get-16186@lists.php.net to get a copy of this message | ||
George Schlossnagle wrote:
I'm not an OO expert, but doesn't this break a fundamental semantic of OOP -- namely that new() returns a new object of the specified class. Isn't this the whole reason that the Singleton pattern exists?yeah I would agree that we should always try to find a non magic solution and in this case a singleton seems to be the obvious choice. however currently its kinda hard to write a singleton that will work even if you inherit from the base class that implements the singleton due to: http://bugs.php.net/bug.php?id=30235 regards, Lukas