Open aartaka opened 4 months ago
Hi there! I actually did have this feature in an earlier version, but I deliberately removed it. In keeping with the spirit of dbg!
, I wanted my macros to behave more or less the same in release builds as they do in debug builds, so I actually don't want them controlled by NDEBUG
.
The name (dbg
) implies use in debug builds and complex debugging scenarios. Which is likely not the same as release. In case you want consistent behavior between debug and release, you use a logging, not debugging.
Hi! I've seen your library on r/C_programming, and I noticed a similarity of your macros and built-in
assert
macro. One notable feature of this macro is that it expands to a null value whenNDEBUG
macro is defined. Which is handy if you want to disable costly asserts in production.Maybe use the same mechanism to disable debugging statements when
NDEBUG
is defined? That'd be a good solution for thepart of the README—if you can disable debug macros, they are safer to use in whatever scenario there is.