3 ms·
The style used doesn't make sense, and defeats the usefulness of an assert error message. You can read an asset in the form I assert that _ will never be
by BoorishBears 10y ago
The style used doesn't make sense, and defeats the usefulness of an assert error message.
You can read an asset in the form
I assert that _ will never be true
The style shown is saying
I assert that false will never be true
And the message for the assert failing will be in a similar format
- unwind 10y agoI think you meant "... will never be false", that's what makes the assert(false) so silly. I feel that some programmers don't understand the actual semantic meaning of the word "assert", they just use it as an opaque key word meaning "check this", or something. To me, it should be possible to read an assert almost like English, i.e. assert(handle != INVALID_HANDLE); can be read like "assert that the handle isn't invalid", i.e. is valid. Hm. I'm not stating this very clearly, sorry.
- BoorishBears 10y agoIndeed I meant false (actually "will always be true" would probably have been easier to understand as well)