#Traits
2 notas · última:
Traits and Mixins Are Not OOP
The article argues that traits and mixins inject code into classes, expose private structure, and weaken encapsulation, making objects harder to understand and maintain than composable decorators.
Pseudo Traits in C#
The post shows how C# 8.0 default interface implementations inspired a trait-like pattern in C# 7.0 using marker interfaces and extension methods, letting empty classes gain behavior by implementing the right interfaces.
