Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:25086 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 96752 invoked by uid 1010); 1 Aug 2006 22:01:24 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 96737 invoked from network); 1 Aug 2006 22:01:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Aug 2006 22:01:24 -0000 X-PHP-List-Original-Sender: helly@php.net X-Host-Fingerprint: 81.169.182.136 ajaxatwork.net Linux 2.4/2.6 Received: from ([81.169.182.136:44712] helo=strato.aixcept.de) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id D7/AD-45114-38ACFC44 for ; Tue, 01 Aug 2006 17:41:23 -0400 Received: from [192.168.1.3] (dslb-084-063-027-180.pools.arcor-ip.net [84.63.27.180]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by strato.aixcept.de (Postfix) with ESMTP id 7C16635C1EC; Tue, 1 Aug 2006 23:41:20 +0200 (CEST) Date: Tue, 1 Aug 2006 23:41:24 +0200 Reply-To: Marcus Boerger X-Priority: 3 (Normal) Message-ID: <18810497049.20060801234124@marcus-boerger.de> To: Michael Wallner Cc: internals@lists.php.net In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [PHP-DEV] RfC: rethink OO inheritance strictness From: helly@php.net (Marcus Boerger) Hello Michael, nobody forces you to use OO if you don't like it but it is as it is. And we cannot make it ignore its basic rules. It might be that you are lazy and have code that would end up without problems if changing signatures at will. However we have a bunch of situations where we cannot allow changes and that is not only interfaces. It si also about magic functions, all that start with __, it is about any signature that has default values or type hints or pass by reference info. So after all where should we draw the line? Any why just because a few people are to lazy for a few keystrokes? Come on give me any reason why we should reinvent OOP theory and make it work. Or why we should change to prototype OOP and make everything damn complex to understand and break all of BC. best regards marcus Friday, July 21, 2006, 10:55:05 AM, you wrote: > Hi (Marcus), > unfortunately I'm not very happy with the direction OO strictness takes > in PHP. I'm sure I'm not alone and many people second this feeling. > Precisely, let's have a look at the following: > mike@honeybadger:~/build/php-5.2-debug$ cli -d"error_reporting=8191" -r > 'class c{function f(){}} class d extends c{function f($a){}}' > Strict Standards: Declaration of d::f() should be compatible with that of > c::f() in Command line code on line 1 > mike@honeybadger:~/build/php-unicode-debug$ cli -d"error_reporting=8191" > -r 'class c{function f(){}} class d extends c{function f($a){}}' > Fatal error: Declaration of d::f() must be compatible with that of c::f() in Command line code on line 1 > I *really* think that this enforcements are no good idea and > I _beg_ you that we leave this "area" to interfaces. > Regards, > -- > Michael Best regards, Marcus