Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18846 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 53818 invoked by uid 1010); 13 Sep 2005 22:25:20 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 53803 invoked from network); 13 Sep 2005 22:25:20 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2005 22:25:20 -0000 X-Host-Fingerprint: 80.74.107.235 mail.zend.com Linux 2.5 (sometimes 2.4) (4) Received: from ([80.74.107.235:36553] helo=mail.zend.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id 45/41-41173-DC157234 for ; Tue, 13 Sep 2005 18:25:18 -0400 Received: (qmail 29845 invoked from network); 13 Sep 2005 22:25:11 -0000 Received: from localhost (HELO ANDI-NOTEBOOK.zend.com) (127.0.0.1) by localhost with SMTP; 13 Sep 2005 22:25:11 -0000 Message-ID: <6.2.3.4.2.20050913152306.058246b0@localhost> X-Mailer: QUALCOMM Windows Eudora Version 6.2.3.4 Date: Tue, 13 Sep 2005 15:25:06 -0700 To: Jeff Moore ,Marcus Boerger Cc: PHP Developers Mailing List In-Reply-To: <52f5f1ca20955a0d00323a86529cd101@procata.com> References: <253fbb6f28c5943cfce697c54ace09d0@procata.com> <454490112.20050913073750@marcus-boerger.de> <52f5f1ca20955a0d00323a86529cd101@procata.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Subject: Re: [PHP-DEV] Subject and Observer Interfaces From: andi@zend.com (Andi Gutmans) Did I miss something? Where/when did Subject/Observer interfaces go into PHP 5.1? These are very generic names. Marcus, I checked PHP CVS and suddenly saw you commited something like this. I would question in general the direction you're going with Spl. But in any case, these if anything they should be SplSubject, SplObserver. No way that SPL should be taking such generic names... Andi At 08:31 AM 9/13/2005, Jeff Moore wrote: >On Sep 13, 2005, at 1:37 AM, Marcus Boerger wrote: > >> there is no way in implementing multi-whatever observer and subjects >>typesafe. > >Java does it. (However, I am most definitely NOT suggesting >emulating java's solution in php.) > >>The other thing you mentioned, sending information along, is not necessary >>because you have access for what you really need, at least you can give >>the access yourself by your design and i strongly encourage you do so. > >Implementation note 6 in the patterns book talks about this, >labeling the two styles push and pull. Push is common, too. (for >example in PRADO and PEAR.) This interface mandates pull. I'm just >suggesting that this particular design for Subject and Observer is >not generic. >There is more to the observer pattern than these interfaces express. >What is the value of defining a standard interface if it can only be >used in a fraction of the common cases and impedes extension? > >I think that if Subject and Observer go into 5.1 as they are now, >two or more of the following will happen: > >Most people won't be able to use them. >Many people will waste time trying to use them before finding the limitations. >They will have to be extended later in a way that breaks backward >compatibility to get around those limitations. >A parallel, more capable, more mechanism will be developed and added later. >They will have to be deprecated in a future release. > >Is there a pressing need to have this in 5.1? Why not wait to a >later release and address some of the things that people commonly >want to do with the observer pattern: > >Additional notification information (push style). >A observer that can receive more than one kind of notification. >A subject that can send more than one kind of notification. > >Regards, > >Jeff Moore > >-- >PHP Internals - PHP Runtime Development Mailing List >To unsubscribe, visit: http://www.php.net/unsub.php