Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35711 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 37433 invoked by uid 1010); 21 Feb 2008 23:26:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 37418 invoked from network); 21 Feb 2008 23:26:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 21 Feb 2008 23:26:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=dz@bitxtender.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dz@bitxtender.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain bitxtender.com from 80.237.132.12 cause and error) X-PHP-List-Original-Sender: dz@bitxtender.com X-Host-Fingerprint: 80.237.132.12 wp005.webpack.hosteurope.de Received: from [80.237.132.12] ([80.237.132.12:37276] helo=wp005.webpack.hosteurope.de) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/EA-64513-7A80EB74 for ; Thu, 21 Feb 2008 18:26:32 -0500 Received: from xdsl-87-79-53-102.netcologne.de ([87.79.53.102] helo=Wombook.lan); authenticated by wp005.webpack.hosteurope.de running ExIM using esmtpsa (TLSv1:RC4-SHA:128) id 1JSKo7-00061M-7t; Fri, 22 Feb 2008 00:26:27 +0100 Cc: Andi Gutmans , Internals Mailing List Message-ID: To: php@stefan-marr.de In-Reply-To: <47BE0664.8060304@stefan-marr.de> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v919.2) Date: Fri, 22 Feb 2008 00:26:26 +0100 References: <001c01c87264$3c01b4e0$b4051ea0$@de> <698DE66518E7CA45812BD18E807866CE014A8D9D@us-ex1.zend.net> <47BE0664.8060304@stefan-marr.de> X-Mailer: Apple Mail (2.919.2) X-bounce-key: webpack.hosteurope.de;dz@bitxtender.com;1203636392;b4d1aa2c; Subject: Re: [PHP-DEV] RFC: Traits for PHP From: dz@bitxtender.com (=?ISO-8859-1?Q?David_Z=FClke?=) Am 22.02.2008 um 00:16 schrieb Stefan Marr: > Sounds a bit like what had been proposed in this paper: http://www.iam.unibe.ch/~scg/Archive/Papers/Duca07b-FreezableTrait.pdf > > The first point, yes exclusion and aliasing are only meant to handle > conflicts, and should be used only in this context. Yeah you can > break the trait with it, but you did it explicitly, think this > should be made clear a bit more in the discussion about "breaking > interfaces". > > Nobody would request unset to be removed from the function set even > though you can do this: > > $a = new A(); > unset($a); > $a->foo(); //damn... > > It is "almost" like excluding a method from a trait and be worried > about the trait breaks. Isn't it? :) I agree. It's called "asking for it". Since traits can only be added in dynamically, a programmer always knows what he is doing when excluding or aliasing a method in a trait. PHP needs to stop worrying about the "confusing newbies" thing when discussing advanced features. We're not talking about a basic bread and butter language construct here. Other parts of PHP aren't beginner friendly either, and not all parts ever could, let alone should. David