Closed makdad closed 12 years ago
I'll merge this later and make sure nothing breaks. (Really need to write some tests but finals are coming up for me).
I've been thinking about this for about a day. Do you think NSAssert is the best option here?
I'm trying to think if there's a time you'd want to call it by passing it arguments that could at some point both be nil - in which case you might expect nothing to happen instead? I'm wondering if some sort of error passing would be good. Then we could propagate errors up from other functions and also add a "Both can't be nil" message. Just a thought.
I have some work to do today (prepping a sculpture for a final crit) but when I'm done I'll pull this in and see if anything breaks in my test app, which is unfortunately the only test method I have right now.
Well, it's really up to you. I was just reading through the code to get familiar with it, and I noticed in the header that it said in the comments, "you must pass one or the other, both can't be nil". So I added asserts to trigger an exception if a dev doesn't heed that requirement -- that's all.
If it is possible to operate those methods without either, but just simply not advisable, then yes, we can strike them. What do you think?
For now we'll keep them as asserts. If in the future someone finds an actual use case for needing to send nil to both sometimes, we can look into it then.