Very well.  I just thought it would be a nice OOP feature to save time on
some people's behalf.




-----Original Message-----
From: Marcus Boerger [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 14 March 2007 8:41 AM
To: [EMAIL PROTECTED]
Cc: internals@lists.php.net
Subject: Re: [PHP-DEV] Native Singleton Implementation

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:[EMAIL PROTECTED] 
> Sent: Sunday, 11 March 2007 8:26 PM
> To: internals@lists.php.net
> Subject: Re: [PHP-DEV] Native Singleton Implementation

> [EMAIL PROTECTED] 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

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to