Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:43740 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 80573 invoked from network); 19 Apr 2009 22:15:56 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2009 22:15:56 -0000 Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Received-SPF: error (pb1.pair.com: domain stefan-marr.de from 85.88.12.247 cause and error) X-PHP-List-Original-Sender: php@stefan-marr.de X-Host-Fingerprint: 85.88.12.247 toolslave.net Received: from [85.88.12.247] ([85.88.12.247:38983] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 51/68-28450-992ABE94 for ; Sun, 19 Apr 2009 18:15:54 -0400 Received: from [91.176.139.60] (helo=[192.168.1.21]) by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1LvfIV-0005Eb-7A; Mon, 20 Apr 2009 00:15:45 +0200 Cc: internals@lists.php.net Message-ID: To: Larry Garfield In-Reply-To: <200904191628.27472.larry@garfieldtech.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v930.3) Date: Mon, 20 Apr 2009 00:15:35 +0200 References: <7CC5C4E4-5DBC-4B86-8F69-E786DD2BDE02@stefan-marr.de> <200904191628.27472.larry@garfieldtech.com> X-Mailer: Apple Mail (2.930.3) Subject: Re: [PHP-DEV] Grafts, Traits, horizontal reuse From: php@stefan-marr.de (Stefan Marr) Hi Larry, > Also, at the risk of scope creep I will ask if any sort of runtime > knowledge > is being considered? That is, would there be a way to at runtime > get a list > of all traits that a given class is using, or access them separately? well, the reflection API will be extended to be able to reflect about traits, too. But beside this, there is "no" notion of traits at runtime. > Would > that be a possible way around the question of duplicate method > names? (Vis, > reimplement the conflicting method and then specify which of the > trait methods > you want to use by calling it, or possibly calling both of them. > That would > allow for potentially interesting use cases, and force the > resolution logic > onto the implementer rather than trying to come up with the perfect > resolution > rules for all case. That is already possible by means of aliasing as described in the RFC [1]. You can provide different aliases for the conflicting methods and then decide how to proceed in the method implemented in the composing class by calling the aliases. Best regards Stefan [1] http://wiki.php.net/rfc/horizontalreuse > > -- > Larry Garfield > larry@garfieldtech.com > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > -- Stefan Marr Programming Technology Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://prog.vub.ac.be/~smarr