Re: new overloading feature?
| From: | cm at leetspeak dot org | Date: | Sat, 06 Nov 2004 00:51:50 +0000 |
| Subject: | Re: new overloading feature? | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-13743@lists.php.net to get a copy of this message | ||
> Andrey Hristov <php@hristov.com> 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