Open skull-squadron opened 11 years ago
Given something like:
@interface X : NSObject <FooMixin, BarMixin>
Both FooMixin and BarMixin define method 'hello'.
TLDR: a way to call all mixed hello's, in mixin order, returning the result of the last.
Could well be wrong, but assume the default behavior of mixing:
The behavior needed is a way to annotate in X that hello should perform all mixed hello's.
This would be useful for DRY, especially for patterns that set defaults in protocol methods.
Imagine being able to implicitly modify viewDidLoad sanely from clean concerns. Now we're talking cleaner, modular code.
And what about selector return values?
Hm, a very interesting feature request. But indeed, what about return values? Would it be good enough if this extension would only support selectors which return void?
Given something like:
Both FooMixin and BarMixin define method 'hello'.
TLDR: a way to call all mixed hello's, in mixin order, returning the result of the last.
Could well be wrong, but assume the default behavior of mixing:
The behavior needed is a way to annotate in X that hello should perform all mixed hello's.
This would be useful for DRY, especially for patterns that set defaults in protocol methods.
Imagine being able to implicitly modify viewDidLoad sanely from clean concerns. Now we're talking cleaner, modular code.