I love reading! You get to travel to faraway places, live adventures in wondrous worlds of magic, save the day, make amazing friends and watch them grow, learn, there’s few things that ignite slow, deep, reflective thinking as books do, borrow from the greates minds of all times, or from people that have invested years of experience and research to bring you that knowledge condensed in a few pages.Yeah… all that…and it’s fun :)
These are the programming related books that I read this year. Perhaps something that’ll be of interest to you?
In the last article of the series you learned about mixins and how you can use them to encapsulate reusable units of behavior that you can compose with your domain objects or classes.
Mixins while awesome have some limitations. In particular, conflicting mixin methods and properties are overwritten when using Object.assign. Moreover, you don’t get any warning when this happens. Updating a mixin with new functionality at some later point in time can inadvertently change the behavior of some of your objects.
Traits offer a solution to this problem by providing a safer and more structured way to do object composition.