Inconsistent treating of assertions
Submitted by Aleksander Wabik
Link to original bug (#597999)
Description
IMO there should be one, unified way of getting rid of assertions in code, when compiling. Now it looks like this:
- all assertions (implicit & explicitly declared by assert()) are compiled in by default
- --disable-assert disables only implicit assertions
- to disable assert(), you CAN'T DO THIS AT THE VALA LEVEL. You must pass "-X -DG_DISABLE_ASSERT", and assertions will be disabled by the C compiler.
Asssertions are commonly used to check constrains in debug versions, I know that Glib gives them slightly different role, but there should be some way of debug-version-only asserting.
A little offtopic:
My proposition would be even to introduce keyword "debug" with syntax:
debug { //statements }
And the debug block would be compiled into program only in debug builds.
Version: 0.7.x