!#$




Lifting your favorite
language with Traits
       Alexandre Bergel
      RMoD team, INRIA,
          Lille, France...
Outline

1. Limitation of single inheritance
2. Traits
3. Retrospective
4. Freezable  Stateful
5. Conclusion
Stream in Squeak


• Example of a library that has been in use for
  almost 20 years
• Contains many flaws in its design
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Presentation of Traits
Upcoming SlideShare
Loading in …5
×

Presentation of Traits

1,739 views

Published on

Traits are a simple composition mechanism for structuring object-oriented programs. A Trait is essentially a parameterized set of methods; it serves as a behavioral building block for classes and is the primitive unit of code reuse. With Traits, classes are still organized in a single inheritance hierarchy, but they can make use of Traits to specify the incremental difference in behavior with respect to their superclasses.

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,739
On SlideShare
0
From Embeds
0
Number of Embeds
105
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Presentation of Traits

  1. 1. !#$ Lifting your favorite language with Traits Alexandre Bergel RMoD team, INRIA, Lille, France alexandre@bergel.eu
  2. 2. Outline 1. Limitation of single inheritance 2. Traits 3. Retrospective 4. Freezable Stateful 5. Conclusion
  3. 3. Stream in Squeak • Example of a library that has been in use for almost 20 years • Contains many flaws in its design

×