|
|
|
|
|
by tumult
6128 days ago
|
|
Yeah I find that delegation makes more sense in an OO context when the states between the delegate and other object are closely entwined. TableView data source is a perfect example, basically the two states need to stay consistent with each other but provide several standardized methods for modifying or reporting changes to state, which is where I think delegate methods shine. "Just waiting for something to return" is where I think they tend to be cumbersome when you have lambdas at your disposal. In this regard I think JS and Obj-C are now starting to converge, which is interesting. |
|