2 ms·
I may have a different understanding than the author, but for me the difference in the name means a lot. The fragment you wrote is clear and simple. But if I se
by viraptor 8y ago
I may have a different understanding than the author, but for me the difference in the name means a lot. The fragment you wrote is clear and simple. But if I see assert_..., then I immediately have questions like: Where's the message printed and does it have enough context for debugging at that point? Is this affected by NDEBUG? Will it run in release builds? Does assert_se() kill the whole application?
Assert already has a meaning and using it in this context is not great.
- mrami 8y agoYes, exactly. Coming from C++/Java, I immediately though, "wait, this is turned off in production?" cf. http://www.cplusplus.com/reference/cassert/assert/ http://www.cplusplus.com/reference/cassert/assert/