[Phpug] Traits in PHP, your opinions
Kae Verens
kae at webworks.ie
Tue Feb 19 19:38:19 GMT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
David Coallier wrote:
> Hello all,
>
> Yesterday a proposal has been made on the internals php list
> (http://news.php.net/php.internals/35562) about the having "traits" in
> PHP.
>
> For those who are unfamiliar with "traits", it's basically a solution
> around multiple inheritance for single inheritance languages as such
> as PHP. It's basically a nice word for "code reuse". It already exists
> in languages as such as Perl, Java, C# and now, proposed for php.
>
> You can read the proposal here:
> http://www.stefan-marr.de/artikel/rfc-traits-for-php.html and you can
> see many examples to enlighten your questions, and for the most
> adventurous of you, you can even read the thesis at the end (which I
> recommend, quite good).
>
> Thoughts ?
David, I love it.
Please whip everyone that disagrees.
This little example did it for me:
<?php
class Talker {
use A { !smallTalk }
use B { !bigTalk, talk => bigTalk }
}
?>
it kinda reminds me of CSS, actually...
Kae
- --
Kae Verens' signature
http://webworks.ie/ lead programmer
http://verens.com/ my blog
http://kfm.verens.com/ current project
- --
this is Kae's signature's signature.
yes, he really is that important.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org
iEYEARECAAYFAke7MCcACgkQA9z/zIBK4hXSZQCgxUKMJI4EY8zjHYhmMah0r03K
7MgAoOks7NbwHo1kIcn6vvTuijSTQ8ZB
=F3Mj
-----END PGP SIGNATURE-----
More information about the Phpug
mailing list