On Aug 27, 2009, at 3:12 PM, Kyle Sluder wrote:
On Thu, Aug 27, 2009 at 9:46 AM, Squ Aire<[email protected]> wrote:
However, do you have any idea how to accomplish what I actually want to do? Is my original idea of forcing asserts to crash maybe bad, which is why noone even thought of suggesting a way to do it?

It's a bad idea. Assertions should be optimized out of your release build.

<IMHO>

This attitude is, at best, a perversion of the very definition of an assertion. Assertions are things that must be true, that is why they are assertions. They do not, check that, should not become less true just because your app is built release vs debug.

Making assertions visible crashes to your users discourages you from
writing assertions and discourages users who have to deal with
crashes.  If they are debug-only issues, you can safely write tons of
assertions and only deal with those that have user-visible effects.

If you are using assertions to test for things that are handleable situations or recoverable errors, you are doing it wrong. Checking is good, but its just that, checking... not asserting.

Developers should definitely do both, not overload checks into some type of cuckolded assertion.

</IMHO>

-Ed

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to