Thursday, December 10, 2009

NSAssert

Vicente Gable:
The NSAssert() function is unreliable, and therefore dangerous. Plain-old assert() is a better choice...

Rob Napier:
Broad use of NSAssert() will not turn ObjC into Eiffel, but it's still a fairly good practice as long as you keep in mind how it's actually implemented and what it's doing. Things to keep in mind about NSAssert():...

Use NSAssert(…) during development.
But set NS_BLOCK_ASSERTIONS pre compiler flag for release.

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.