Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why doesn FOX use ASSERTs to check API arguments?

API asserts fox
0
Posted

Why doesn FOX use ASSERTs to check API arguments?

0

The philosophy of error checking is like this: • As a library, FOX is installed and used by many programs, and so under normal circumstances it is compiled with optimization flags, and so assertions and such are normally removed. • Application developers may compile their own code with debugging enabled, but usually link against a pre-installed copy of the library. • Thus, errors in arguments and such need to be checked by means other than assertions. • If you’re working on additional FOX widgets, or perhaps suspect a bug in the FOX library, then the library can be compiled for debug mode. In this case, we’re interested to uncover bugs and inconsistencies in the library itself, so assertions and tracing and so on must be turned on. • The assertions in the library itself should however NEVER be triggered, even if the application program is ill-behaved or the library is used in the wrong way:- because the assertions are there to verify the correctness of the library itself, and the stand

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123