Search code examples
objective-ckvc

KVC and modern syntax


Did KVC pick up any of the features of objective-c literals a.k.a. 'modern objective-c'

I'm wondering because it would be really handy if there were something far shorter, and more readable than

[someObject setValue:someValue forKey:someKey];


Solution

  • Probably same as you, I was unable to find any information on that

    But I think the issue with KVC following "modern objective-c" is that the compiler wouldn't have any way to tell if you referenced a variable that's out of scope, or if you misspelled something.

    So I think KVC will always have to follow the standard message syntax