This is a concept that I'm still a little fuzzy on, and have never really completely understood. When is it appropriate for methods to return (void)?
I was looking at the NSMutableSet methods and was specifically thinking about the -(void) unionSet: and the -(void) minusSet: methods. So why don't these methods return an (id) which would be the resulting NSMutableSet object?
If I were writing a method for the addition of two integers, I would expect an (int) result, so when I essentially add two NSMutableSet objects with a unionSet: method why does it not return anything? To me it's not intuitive at all, is there a rule of thumb that I'm forgetting?
I was looking at the NSMutableSet methods and was specifically thinking about the -(void) unionSet: and the -(void) minusSet: methods. So why don't these methods return an (id) which would be the resulting NSMutableSet object?
If I were writing a method for the addition of two integers, I would expect an (int) result, so when I essentially add two NSMutableSet objects with a unionSet: method why does it not return anything? To me it's not intuitive at all, is there a rule of thumb that I'm forgetting?