[Phpug] Traits in PHP, your opinions
David Coallier
davidc at php.net
Tue Feb 19 19:49:51 GMT 2008
On Feb 19, 2008 2:38 PM, Kae Verens <kae at webworks.ie> wrote:
> -----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.
I asked for opinions, all opinions are valid. :) No need to whip
otherwise the discussion becomes obsolete and we can call it "Opinion
enforcement ;-)"
>
> 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...
Fun you are mentionning this part, that's the only part we are
actually questionning on the syntax if we should allow it or not. But
I love it as well.. LOVE IT
I can create some abstraction leaking but I believe that can happen anywhere.
>
> 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-----
>
> _______________________________________________
> Phpug mailing list
> Phpug at lists.iephpug.org
> http://lists.iephpug.org/mailman/listinfo/phpug
> Member Map http://www.frappr.com/irishphpusersgroup/
> Membership Planner Calendar: http://tinyurl.com/opjd5
>
--
David,
Re-read what you are replying.
More information about the Phpug
mailing list