[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[IMP-dev] Proposed change to checks and asserts



This proposal tries to address two problems:
- for implementers: it is no clear what the difference between IMP_check and IMP_assert is and when one should be used and not the other - for users: getting nice feedback about incorrect usage of IMP also turns on all sorts of (slow) checks of various internal implementation details.

To address this, I propose:
- provide IMP_implementation_check and IMP_usage_check macros
- provide a methods to turn on and off the two different types of checks independently
- remove the concept of check levels

To implement the proposal I would do:
- replace all IMP_assert with IMP_implemenetation_check
- replace all IMP_check with IMP_usage_check
- debug mode, by default, has both sorts of checks enabled
- release mode has just usage checks
- fast mode has none