Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35634 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 7033 invoked by uid 1010); 20 Feb 2008 00:38:07 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 7018 invoked from network); 20 Feb 2008 00:38:07 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2008 00:38:07 -0000 Authentication-Results: pb1.pair.com smtp.mail=stas@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=stas@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 212.25.124.162 as permitted sender) X-PHP-List-Original-Sender: stas@zend.com X-Host-Fingerprint: 212.25.124.162 mail.zend.com Windows 2000 SP4, XP SP1 Received: from [212.25.124.162] ([212.25.124.162:20645] helo=mx1.zend.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 4E/74-55225-E667BB74 for ; Tue, 19 Feb 2008 19:38:07 -0500 Received: from us-ex1.zend.com ([192.168.16.5]) by mx1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 20 Feb 2008 02:38:11 +0200 Received: from [192.168.16.90] ([192.168.16.90]) by us-ex1.zend.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 19 Feb 2008 16:38:08 -0800 Message-ID: <47BB7667.5030202@zend.com> Date: Tue, 19 Feb 2008 16:37:59 -0800 Organization: Zend Technologies User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Lars Strojny CC: php@stefan-marr.de, internals@lists.php.net References: <001c01c87264$3c01b4e0$b4051ea0$@de> <1203461114.24580.45.camel@localhost> <47BB5EFE.4080704@zend.com> <1203465456.3529.3.camel@localhost> <47BB6D6A.4080408@zend.com> <1203466541.3529.15.camel@localhost> In-Reply-To: <1203466541.3529.15.camel@localhost> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 20 Feb 2008 00:38:08.0244 (UTC) FILETIME=[DD049340:01C87358] Subject: Re: [PHP-DEV] RFC: Traits for PHP From: stas@zend.com (Stanislav Malyshev) Hi! > As traits are fixed compositions in contrast to the dynamic concept > mixin it's in the hands of the developer to let replace() do the right > thing [tm] as the developer has all the information he needs to decide > what replace() needs to do when writing code. replace() does the right thing - it uses add() and delete(). The problem here is that current proposal allows any user to yank the ground from under the feet of the trait API creator and replace various bits of the class with any other functionality without any regard for the interdependency between them, so either each function in the traits should be completely self-reliant and never use other functions - which prevents one from create complete non-trivial APIs - or every rename should be painfully verified with original trait developer or against the actual source code, breaking the abstraction. Both don't seem too practical to me. -- Stanislav Malyshev, Zend Software Architect stas@zend.com http://www.zend.com/ (408)253-8829 MSN: stas@zend.com