Traits – Presentation for AFUP in Paris

Today, I gave a presentation on Traits for PHP in Paris. It was a quite interesting audience, ca. 35 professional PHP developers and all interested in Traits.

My presentation gave an introduction into the motivation and language design of Traits for PHP. Also discussing details like the actual implementation in the Zend Engine.

Afterwards, Frédéric Hardy gave a presentation to demonstrate the use of traits in testing, I believe. Well, the talk was in French after all, which made following for me rather impossible, unfortunately.

So, the overall conclusion is, there are quite a few people interested in using traits in the real world. Thats good, but might result in the paradox that the most influential work I will do for a long time, is bringing the result of a course work to the #4 programming language in the world… *sigh*

Tags: , , , , ,

3 Responses to “ Traits – Presentation for AFUP in Paris”

  1. Guile December 17, 2010 at 17:39 #

    I have a question : why use a new operator “insteadof” for conflict solving?
    Détermine to use a particular method from a trait implicitly excludes the same method from other used traits.
    Is there any reason of that new operator for conflicts?

  2. Stefan December 18, 2010 at 01:11 #

    The question is why to use an explicit insteadof with a list of methods from other traits to be excluded?
    The reason for that design is two-fold. First, the explicit listing of excluded methods will enable to recognize all possibly unwanted changes/collisions. There is no silent overriding going on. Just giving the explicit preference to a method would hide potentially problematic changes in the traits use hierarchies.

    The second reason for using the insteadof design is that the community did not want a simple exclude operator which could be used to explicitly exclude methods. With this preference operator, it is not possible to leave out arbitrary methods from a trait. Instead, traits are composed into the class completely, and it can only happen that a method of a trait is not composed into a class when conflict occurred.
    With this approach there is a minimal coherence for the trait given, i.e., it can rely on the fact that all method names it uses are actually available in the class.

  3. Evgeniy June 29, 2011 at 20:48 #

    Hello. Thank you very much for Traits. I love it and I’m sure it’s new step of OOP evolution in PHP.