Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:13743 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 35463 invoked by uid 1010); 6 Nov 2004 00:49:49 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 35023 invoked from network); 6 Nov 2004 00:49:45 -0000 Received: from unknown (HELO spawn.leetspeak.org) (217.28.101.109) by pb1.pair.com with SMTP; 6 Nov 2004 00:49:45 -0000 Received: (qmail 10314 invoked from network); 6 Nov 2004 01:51:50 +0100 Received: from unknown (HELO mail.leetspeak.org) (127.0.0.1) by localhost with SMTP; 6 Nov 2004 01:51:50 +0100 Received: from 216.98.60.147 (SquirrelMail authenticated user cm); by mail.leetspeak.org with HTTP; Sat, 6 Nov 2004 01:51:50 +0100 (CET) Message-ID: <1135.216.98.60.147.1099702310.squirrel@216.98.60.147> Date: Sat, 6 Nov 2004 01:51:50 +0100 (CET) To: internals@lists.php.net User-Agent: SquirrelMail/1.4.3a X-Mailer: SquirrelMail/1.4.3a MIME-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Priority: 3 (Normal) Importance: Normal Subject: Re: [PHP-DEV] new overloading feature? From: cm@leetspeak.org > Andrey Hristov writes: > There are absolutely ways to do this purely at the application level. It just > seems that it'd be a really clean, easy to program, easy to understand methodology to pass the key value to the request for a new instance, and get > back either a new instance, or a previously existing one with that key value. I don't think it's "really clean" to not return a *new* instance with a *new* call. I'm not sure what kind of advantage it gives you over a private constructor and a static getInstance($n) function. Cheers, Michael