4 ms·
He skipped over KVO, KVC and related reflection capabilities of Objective-C that make it so flexible. I like and use swift, but I haven't reached a point where
by jawngee 10y ago
He skipped over KVO, KVC and related reflection capabilities of Objective-C that make it so flexible.
I like and use swift, but I haven't reached a point where a lightbulb went off and I proclaimed "Hey I needed this".
- adamnemecek 10y ago> I haven't reached a point where a lightbulb went off and I proclaimed "Hey I needed this". You don't feel more productive in swift? Like a lot more?
- mpweiher 10y agoNo. EDIT: Just the compile times alone drive me batshit. That doesn't mean that there aren't nice aspects, certainly some of the syntax has been simplified by unifying two disparate syntaxes...but they could have done so much better, even there.
- mikeash 10y agoKVO is horrendous. KVC is occasionally nice but often greatly overused. I certainly wouldn't miss either one.
- mpweiher 10y ago"The solution to bad metasystems is not to ban metasystems, it is to design better metasystems that allow these things in a more disciplined and more flexible way." http://blog.metaobject.com/2016/05/what-missing-in-discussion-about.html http://blog.metaobject.com/2016/05/what-missing-in-discussio... See also: The Siren Call of KVO and Cocoa Bindings http://blog.metaobject.com/2014/03/the-siren-call-of-kvo-and-cocoa-bindings.html http://blog.metaobject.com/2014/03/the-siren-call-of-kvo-and...
- chillacy 10y agoYea, I think KVO could be done better. As I recall, Ember properties were pretty neat, and had a nice way of specifying dependencies. A lot less awkward than a bunch of + (NSSet )keyPathsForValuesAffectingValueForKey:(NSString )key methods. I'd also want more strongly typed keys, less strings everywhere. I do use NSStringFromSelector as much as I can, but strings are unavoidable in IB. Also the handling of one-to-many dependencies could be made a lot more intuitive as well.