Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:47609 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 64716 invoked from network); 25 Mar 2010 15:25:39 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Mar 2010 15:25:39 -0000 Authentication-Results: pb1.pair.com smtp.mail=dsoria@gmx.net; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dsoria@gmx.net; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmx.net designates 213.165.64.20 as permitted sender) X-PHP-List-Original-Sender: dsoria@gmx.net X-Host-Fingerprint: 213.165.64.20 mail.gmx.net Received: from [213.165.64.20] ([213.165.64.20:47748] helo=mail.gmx.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 8F/66-31790-2708BAB4 for ; Thu, 25 Mar 2010 10:25:39 -0500 Received: (qmail invoked by alias); 25 Mar 2010 15:25:35 -0000 Received: from e180066246.adsl.alicedsl.de (EHLO shedir.lan) [85.180.66.246] by mail.gmx.net (mp056) with SMTP; 25 Mar 2010 16:25:35 +0100 X-Authenticated: #235172 X-Provags-ID: V01U2FsdGVkX1/K0xJgWnrKT/gK7EfJW1pjDELyjxqz8R5ssn8SRN JUH4nSZs0o+g9n Message-ID: <4BAB806E.2000605@gmx.net> Date: Thu, 25 Mar 2010 16:25:34 +0100 User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; de; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3 MIME-Version: 1.0 To: Stefan Marr CC: Lukas Kahwe Smith , David Soria Parra , internals@lists.php.net 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> <59FC478A-8F2F-4EB7-9E4F-58BFD3000E3C@stefan-marr.de> In-Reply-To: <59FC478A-8F2F-4EB7-9E4F-58BFD3000E3C@stefan-marr.de> X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Y-GMX-Trusted: 0 X-FuHaFi: 0.46000000000000002 Subject: Re: [PHP-DEV] horizontal reuse: traits vs. grafts From: dsoria@gmx.net (David Soria Parra) -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Am 25.03.10 16:21, schrieb 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. >>> >>> But as said just a general idea that I might try to work on once traits are comittet. >>> >>> Stefan what do you think about "stackable traits" ? >> >> 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 > '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. yes that might be a good option, I'll keep it in mind for the case I would write an RFC once we got the basics right. > But, well, it is extension, think we should get the basics right first. yes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkurgG4ACgkQ/snRGA1Vb0tEnQCbB7vECvafSy9ND1iXSciG10mU k6kAoPJTAZmI5ZVN2WOFDgR6Ga/6moLY =eMdt -----END PGP SIGNATURE-----