@elextr I find it pertinent to use these macros when they are meant to detect programming errors. Yes, you can be forcefully defensive and always check no matter the debugging status, but the point these macros can be disabled (although in practice most builders don't disable them anyway) is for one to be able to trade safety for more speed.
So IMO if a builder do want to disable those checks, fine, but they gotta know it's less defensive. Which could make sense, as these checks are for programming errors, and should not depend on user behavior.
In all cases, I think using a GError for programming error is worse than emitting a warning somewhere, because it's harder to handle the error and it could be ignored and left unnoticed more easily.
Your documentation for the function doesn't disallow NULL
It odes, unless you accept `NULL` to be valid for *The project*, and as the function is supposed to save it to a file, I wouldn't expect `NULL` to be a valid one unless explicitly stated otherwise.
github-comments@lists.geany.org