Stop ignoring asserts when running in optimized mode

One option I have not seen that would be better than the status quo:

  • turn assert off by default
  • make -O be a noop
  • add a command line switch, say --debug or --assert that enables assert

Presto chango, problem solved! People stop using assert inappropriately.

10 Likes