Open markohlebar opened 9 years ago
I find myself using BINDO quite a lot, especially for marking computed properties as requiring updating.
For example:
[BINDO(self, quantity) observe:^(id observable, NSNumber *value, NSDictionary *observationInfo) {
[self willChangeValueForKey:@"canDecrement"];
[self didChangeValueForKey:@"canDecrement"];
}];
...
- (BOOL)canDecrement {
return self.selectedItem.quantity > MIN_AMOUNT;
}
.. though I'm sure the above could be achieved in a different way.
@benvium good shout! BINDO is pretty useful I agree. I think shorthands are a waste of space though :) I don't want to be precious about features and maintain stuff that nobody uses.
It seems that the usage really boils down to
BINDViewModel
andBIND
. In terms of simplifying the interface we should trim unnecessary features like shorthandsBINDSL
,BINDSR
,BINDOS
andBINDS
which clutter the DSL and autocompletion.