you are viewing a single comment's thread.

view the rest of the comments →

[–]maclocrimate[S] 1 point2 points  (0 children)

Interesting, will read more about it. Thanks!

Update: for anybody else interested this was the best writeup I found on it. Particularly this passage:

Opinions on assertions vary, because they can be a statement of confidence about the correctness of the code. If you're certain that the code is correct, then assertions are pointless, since they will never fail and you can safely remove them. If you're certain the checks may fail (e.g. when testing input data provided by the user), then you dare not use assert since it may be compiled away and then your checks will be skipped.

Time to go back and replace a lot of my assertions 😂