Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:35657 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 23010 invoked by uid 1010); 20 Feb 2008 20:20:32 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 22995 invoked from network); 20 Feb 2008 20:20:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 20 Feb 2008 20:20:32 -0000 Authentication-Results: pb1.pair.com header.from=lars@strojny.net; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=lars@strojny.net; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain strojny.net designates 85.10.204.248 as permitted sender) X-PHP-List-Original-Sender: lars@strojny.net X-Host-Fingerprint: 85.10.204.248 milch.schokokeks.org Received: from [85.10.204.248] ([85.10.204.248:33480] helo=milch.schokokeks.org) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E6/63-30965-F8B8CB74 for ; Wed, 20 Feb 2008 15:20:32 -0500 Received: from [192.168.0.8] (xdsl-87-78-214-192.netcologne.de [::ffff:87.78.214.192]) (AUTH: PLAIN lars@schokokeks.org, SSL: TLSv1/SSLv3,256bits,CAMELLIA256-SHA) by milch.schokokeks.org with esmtp; Wed, 20 Feb 2008 21:20:28 +0100 id 0000000000020002.0000000047BC8B8C.00007C81 To: Marcus Boerger Cc: Stefan Marr , Evert|Rooftop , Stanislav Malyshev , internals@lists.php.net In-Reply-To: <1495054633.20080220205951@marcus-boerger.de> References: <001c01c87264$3c01b4e0$b4051ea0$@de> <173732199.20080219175837@marcus-boerger.de> <1203452909.24580.9.camel@localhost> <1e12984d0802191323o710c6b8ej3a54af7901cf35f1@mail.gmail.com> <47BB4AC9.9070701@zend.com> <1e12984d0802191346x7c145d7fp14c01ec4e5993779@mail.gmail.com> <47BB4F49.1030904@rooftopsolutions.nl> <1e12984d0802191359p4f21c3acrdff4b86adfb4bf3@mail.gmail.com> <1495054633.20080220205951@marcus-boerger.de> Date: Wed, 20 Feb 2008 21:20:27 +0100 Message-ID: <1203538827.29219.7.camel@localhost> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="=_milch.schokokeks.org-31873-1203538828-0001-2" X-Mailer: Evolution 2.21.91 Subject: Re: [PHP-DEV] RFC: Traits for PHP From: lars@strojny.net (Lars Strojny) --=_milch.schokokeks.org-31873-1203538828-0001-2 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Marcus, Am Mittwoch, den 20.02.2008, 20:59 +0100 schrieb Marcus Boerger: [...] > so at th eend of the day users will get renaming and will abuse it. I disagree here. I think aliasing is fundamental to traits. If we think of traits as buckets of functionality, the concrete structure of the trait does not really matter. What matters is how the trait is used in the consuming class. Part of the usage is how the trait methods are exposed to the class. So I would really like to see aliasing support as long as there are no technical limitations that forbid proper and simple and understandable aliasing. > That said I am wondering if at the beginning we might want to do Traits > without aliasing and dropping. If we feel it gets necessary we probbaly > might want to support a syntax like: > 'trait_method' =3D> false > 'trait_method' =3D> 'new_name' > 'trait_method' =3D> array('new_name', 'trait_method' I have another syntax proposal: class Foo { consume TFoo { methodName as newMethodName; ignore otherMethod; } } "foo as bar" seems easy to grasp for me. Ignore seems to be technically correct, as the method is not dropped or removed but just ignored for the current class context. I would really prefer not to use "exhibit" or "possess". Most OOP terms are really basic english to make also non-english speakers get the concepts easily. "abstract", "class", "object", "interface", etc. pp. is pretty basic, while "exhibit" or "possess" is maybe not part of the common basic vocabulary. cu, Las --=_milch.schokokeks.org-31873-1203538828-0001-2 Content-Type: application/pgp-signature; name="signature.asc" Content-Transfer-Encoding: 7bit Content-Description: Dies ist ein digital signierter Nachrichtenteil -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (GNU/Linux) iQIcBAABAgAGBQJHvIuEAAoJECQPF+sCY6wH8OEQAJ3Q1j7runo52THJT1NzhRBs KdEnTTXtMgD7yueGCmpwSOhzxvVqRNtMZ2zAjQnI5/l7kcbMFWyGyhsKT6FZd6eh XSFnIva0HV0uzzD2GCEbqSyrg3WrRUQ0tAvURKsqetFVXPpvaSzrW8G7htEYXfE+ SFv+oWj81jIDjZZiWHBC8QV4u2Rvh2iOxkQAZd6CRrhCHZ+ekllnnWdt1FyGmthv JCQQPEpFqCWTIKiik/M30SSJKFmvczmpMUQyhdkPyIlG0L929VADo81Jfqoy3ska Q752yF8/3m8kSVeQWzTYMgYTwrgJIrf3ZclQYWGu6raNV6/CnUkpGxFugERUnLnO bRJGeknU2h12i1vnnifAmNtIRAljMVmFwlGWP/1tW3MpKN1t3c3GSm8J1VtCMaLs Ht4CAs3NOyhYW/Vi1DAOpGci8Hc+2LAa0JK6xBMAwtqAc83H/7pDFltbdGuWuj2Z 6D+cH4KyBn+vIyO0SFxFqQihCHbgTegwxtMZnojRD1REzaR72+3m17xT2koEC0md DvjMx4++wUCk4sdkigGVt5oMTz3EJqDDo0xI/6UzVR/aELqSmTkDiRmUlpMdssrD 6gXpMnodwkrhOW5V8X8OlY4CnTxbI5r2hVWd7IxH0k1Arbjm/gdqvP+YIY4lfWlX wxoCH3PzQvoZ1stUsWVN =8JnK -----END PGP SIGNATURE----- --=_milch.schokokeks.org-31873-1203538828-0001-2--