News for hackers. Stuff that matters.
Re:Assert() in the hands of bad coders by BoorishBears on Tuesday March 28, 2017 @08:10AM (#13975869)
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
Re:Assert() in the hands of bad coders by unwind on Tuesday March 28, 2017 @09:20AM (#13976305)
I 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.
Re:Assert() in the hands of bad coders by BoorishBears on Tuesday March 28, 2017 @06:41PM (#13981508)
Indeed I meant false (actually "will always be true" would probably have been easier to understand as well)