Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:9370 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 62715 invoked by uid 1010); 19 Apr 2004 10:28:55 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 62636 invoked from network); 19 Apr 2004 10:28:55 -0000 Received: from unknown (HELO xaxa.search.ch) (195.141.85.118) by pb1.pair.com with SMTP; 19 Apr 2004 10:28:55 -0000 Received: from localhost (localhost [127.0.0.1]) by xaxa.search.ch (Postfix) with ESMTP id B51B36CF92; Mon, 19 Apr 2004 12:28:54 +0200 (CEST) Received: by xaxa.search.ch (Postfix, from userid 65534) id ABA6B6D841; Mon, 19 Apr 2004 12:28:53 +0200 (CEST) Received: from cschneid.com (ultrafilter2-i [192.168.85.3]) by xaxa.search.ch (Postfix) with ESMTP id 032D76CF92; Mon, 19 Apr 2004 12:28:53 +0200 (CEST) Message-ID: <4083A9E3.4070504@cschneid.com> Date: Mon, 19 Apr 2004 12:28:51 +0200 User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114 X-Accept-Language: en-us, en, de-ch, de MIME-Version: 1.0 To: zeev@zend.com Cc: Andi Gutmans , internals@lists.php.net References: <5.1.0.14.2.20040419112627.03efaa00@localhost> <5.1.0.14.2.20040419130523.04e3fe60@localhost> In-Reply-To: <5.1.0.14.2.20040419130523.04e3fe60@localhost> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 2.63 (2004-01-11) on xaxa.search.ch X-Spam-Level: X-Spam-Status: No, hits=-4.9 required=5.0 tests=BAYES_00 autolearn=ham version=2.63 X-Virus-Scanned: by AMaViS 0.3.12pre8 Subject: Re: [PHP-DEV] Interface inheritance From: cschneid@cschneid.com (Christian Schneider) Zeev Suraski wrote: > 1. First of all, I agree that in a perfect world we should go with > E_COMPILE_ERROR for everything. Maybe now that's constructors are out I'm not sure I understand what you mean by everything. > whole interface/abstract/class type hints mechanism was added for the > sole reason of enforcing prototypes, and effectively, it is pretty much Concerning interface/abstract classes I can see you reasoning for enforcing the prototype. Personally I don't feel like using interfaces and abstract classes but as it is implemented in PHP5 it should be done right. Make whips and chains people suffer fully from their bondage addiction :-) For class type hints (this is specifying the parameter type in your function definition, right?) I think it should be enforced for *calling* but not for extending. A specialized class often leaves out parameters of the generic base class. E.g. db_record_foo may extend db_record which takes the table as an argument which will always be foo for the specialized class and hence left out there. Does that make sense? - Chris