I came across Samuel Sutch's Objective-C implementation of JSON-RPC and saw what to me is a curious pattern: methods with no name that take any object (id) as an argument and return an object of indeterminate type (id)
- (id):(id)arg {
// do stuff
}
While this is legal in Objective-C it sure is difficult for me to follow. That said, I'm not an expert in ObjC so I consider this a learning opportunity.
I suspect that the reasoning behind this has something to do with the fact that the author is implementing a version of the "Deferred" pattern. Still, it seems like code that is very hard to maintain. I'm hoping to get in touch with the author and learn more. At a minimum I hope to become better educated.
Technorati Tags: Mac OS X, Objective-C, open source, software development
No comments:
Post a Comment