Tagged Questions
1
vote
3answers
352 views
When should one use “out” parameters?
In Objective-C, there are several methods like initWithContentsOfFile:encoding:error: where one passes in a reference to an NSError object for the error: parameter. In this example, the value of the ...
3
votes
4answers
297 views
Is conditional return type ever a good idea?
So I have a method that's something like this:
-(BOOL)isSingleValueRecord
And another method like this:
-(Type)typeOfSingleValueRecord
And it occurred to me that I could combine them into ...