4 ms·
In a current project, to support the "mix-in" style of development that decorators provide, I am preferring to extend the base class at class definition time, i
by syntheticcdo 5y ago
In a current project, to support the "mix-in" style of development that decorators provide, I am preferring to extend the base class at class definition time, ie:
class Example extends mixin(BaseClass) {}
as opposed to the decorator style:
@mixin
class Example extends BaseClass {}
If you dislike decorators, what are your thoughts on this style of code?