• Like
Presentation of Traits
Upcoming SlideShare
Loading in...5
×

Presentation of Traits

  • 1,401 views
Uploaded 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 …

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.

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,401
On Slideshare
0
From Embeds
0
Number of Embeds
2

Actions

Shares
Downloads
22
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

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