Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28332 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 90561 invoked by uid 1010); 13 Mar 2007 22:40:54 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 90545 invoked from network); 13 Mar 2007 22:40:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Mar 2007 22:40:54 -0000 Authentication-Results: pb1.pair.com header.from=helly@php.net; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=helly@php.net; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain php.net from 69.46.103.200 cause and error) X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 69.46.103.200 mail.globalsuite.net Linux 2.5 (sometimes 2.4) (4) Received: from [69.46.103.200] ([69.46.103.200:48713] helo=mail.globalsuite.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id AA/03-03168-37827F54 for ; Tue, 13 Mar 2007 17:40:52 -0500 Received: from mail.globalsuite.net (unknown [127.0.0.1]) by mail.globalsuite.net (Symantec Mail Security) with ESMTP id 22A0530611; Tue, 13 Mar 2007 16:40:49 -0600 (MDT) X-AuditID: c0a8013c-ab2e9bb000003f1f-15-45f7287038f3 Received: from IPOfCard1.guest-tek.com (c207.134.68-130.clta.globetrotter.net [207.134.68.130]) by mail.globalsuite.net (Symantec Mail Security) with ESMTP id 393F430619; Tue, 13 Mar 2007 16:40:48 -0600 (MDT) Received: from [192.168.1.196] (HydraIRC@[192.168.1.196]) by IPOfCard1.guest-tek.com (8.11.6/8.11.6) with ESMTP id l2DMeb513917; Tue, 13 Mar 2007 17:40:37 -0500 Date: Tue, 13 Mar 2007 23:40:45 +0100 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <1960276.20070313234045@marcus-boerger.de> To: scott.mcnaught@synergy8.com CC: internals@lists.php.net In-Reply-To: <000101c76483$f691c470$0900a8c0@scottnote> References: <36961.127.0.0.1.1173580198.squirrel@synergy8.com> <000101c76483$f691c470$0900a8c0@scottnote> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: AAAAAA== Subject: Re: [PHP-DEV] Native Singleton Implementation From: helly@php.net (Marcus Boerger) Hello scott, reason we are agsinst is that you can easily do i already in PHP. Actually you can even do it in a manner everybody understands without having to make the language more complex. Or in other words sometimes it does not hurt doing a few keystrokes more. Instead it helps read- and maintain-ability. best regards marcus Monday, March 12, 2007, 9:53:52 AM, you wrote: > Perhaps I should not call it singleton then. Because I'm not trying to put > a flexible design pattern with large degrees of freedom as such into core > php. All I am trying to achieve is a nice way for people to implement > classes that only ever need one instance. > Can I ask why you are very much against this if you are? It seems that most > people need to do this at some point. I am starting to feel there's a lot > of negativity towards this because it's a different approach. > Good point about the uniqueness across one / all php instances. I was only > thinking of one unique instance for just the current php instance / request. > Definitely something to consider. > -----Original Message----- > From: Sebastian Bergmann [mailto:sb@sebastian-bergmann.de] > Sent: Sunday, 11 March 2007 8:26 PM > To: internals@lists.php.net > Subject: Re: [PHP-DEV] Native Singleton Implementation > scott.mcnaught@synergy8.com wrote: >> Yes! Moving the singleton functionality into core php. Its an excellent >> OOP feature. > Besides the obvious implementation considerations (should the Singleton > object be unique in a single PHP instance or across "all" PHP instances, > etc.), I am very much against putting reference implementations of > design patterns into a programming language. If you want this, you have > not understood the intention of design patterns (or the difference (in > degrees of freedom) when compared to algorithms). > -- > Sebastian Bergmann http://sebastian-bergmann.de/ > GnuPG Key: 0xB85B5D69 / 27A7 2B14 09E4 98CD 6277 0E5B 6867 C514 B85B 5D69 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php Best regards, Marcus