Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:18830 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 97993 invoked by uid 1010); 13 Sep 2005 14:42:42 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 97978 invoked from network); 13 Sep 2005 14:42:42 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 13 Sep 2005 14:42:42 -0000 X-Host-Fingerprint: 65.19.190.98 procata.com Linux 2.4/2.6 Received: from ([65.19.190.98:56739] helo=procata.com) by pb1.pair.com (ecelerity 2.0 beta r(6323M)) with SMTP id AB/BA-58045-A55E6234 for ; Tue, 13 Sep 2005 10:42:41 -0400 Received: from 65.111.204.167 ([65.111.204.167]) by procata.com for ; Tue, 13 Sep 2005 07:42:23 -0700 In-Reply-To: References: <253fbb6f28c5943cfce697c54ace09d0@procata.com> Mime-Version: 1.0 (Apple Message framework v622) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-ID: Content-Transfer-Encoding: 7bit Cc: internals@lists.php.net Date: Tue, 13 Sep 2005 10:42:34 -0400 To: Sebastian Bergmann X-Mailer: Apple Mail (2.622) Subject: Re: [PHP-DEV] Subject and Observer Interfaces From: jeff@procata.com (Jeff Moore) On Sep 13, 2005, at 1:35 AM, Sebastian Bergmann wrote: > You can extend the interfaces ... > and adapt them to your needs while retaining the possibility to use > them > with other code that only knows about the original Subject and > Observer > interfaces. Actually you can't and still be typesafe. If I extend Observer and add a changed() method, I cannot pass that new object to a standard Subject interface because that interface has no business calling the changed() method since its not on the base Observer interface that it specified. There are other problems. The two interfaces are tightly coupled and extensions are not interoperable and thats why I think they aren't generic enough to be a standard base class in PHP.