Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47608 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 63272 invoked from network); 25 Mar 2010 15:21:54 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2010 15:21:54 -0000 Authentication-Results: pb1.pair.com header.from=php@stefan-marr.de; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php@stefan-marr.de; spf=permerror; 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:41110] helo=uhweb12247.united-hoster.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 77/26-31790-F8F7BAB4 for ; Thu, 25 Mar 2010 10:21:52 -0500 Received: from soft83.vub.ac.be ([134.184.43.183]) by uhweb12247.united-hoster.com with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1NuosR-0007O3-Gs; Thu, 25 Mar 2010 16:21:46 +0100 Mime-Version: 1.0 (Apple Message framework v1077) Content-Type: text/plain; charset=us-ascii In-Reply-To: <5EE73B98-FC94-4110-BA74-189B547A7ED5@pooteeweet.org> Date: Thu, 25 Mar 2010 16:21:38 +0100 Cc: David Soria Parra , internals@lists.php.net Content-Transfer-Encoding: quoted-printable Message-ID: <59FC478A-8F2F-4EB7-9E4F-58BFD3000E3C@stefan-marr.de> References: <690D1362-7F1D-47B9-A4BF-EEA9CF38C5B0@pooteeweet.org> <001601cacb74$0b037020$210a5060$@com> <9721DC06-BE10-49D0-BEDA-6B6FEB26B49D@stefan-marr.de> <5EE73B98-FC94-4110-BA74-189B547A7ED5@pooteeweet.org> To: Lukas Kahwe Smith X-Mailer: Apple Mail (2.1077) Subject: Re: [PHP-DEV] horizontal reuse: traits vs. grafts From: php@stefan-marr.de (Stefan Marr) On 25 Mar 2010, at 16:00, Lukas Kahwe Smith wrote: > On 25.03.2010, at 14:48, David Soria Parra wrote: >> This approach is taken in scala and works pretty fine there for = composing classes >> during runtime and should be douable in PHP too. For sure aliasing is = not >> possible in this example. >>=20 >> But as said just a general idea that I might try to work on once = traits are comittet. >>=20 >> Stefan what do you think about "stackable traits" ? >=20 > Woha .. that code really scares me. I am not scared, it is just dynamic, and goes in the direction of = prototype-based OO. It could be implemented as hidden/shadow classes. Thus interpret=20 'new Person() with Philsophical, Drink;' as a class definition itself, = with some name-mangling it would be possible. And should not result in = noticeable overhead. At least that is where Self and V8(JavaScript) are = getting their speed from. But, well, it is extension, think we should get the basics right first. Best regards Stefan > regards, > Lukas Kahwe Smith > mls@pooteeweet.org >=20 >=20 >=20 >=20 > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php >=20 --=20 Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 2974 Fax: +32 2 629 3525