{"body":"Opinions on assertions vary, because they can be a statement of \nconfidence about the correctness of the code. If you're certain that the \ncode is correct, then assertions are pointless, since they will never \nfail and you can safely remove them. If you're certain the checks can \nfail (e.g. when testing input data provided by the user), then you dare \nnot use assert since it may be compiled away and then your checks will be \nskipped.\n\nIt's the situations in between those two that are interesting, times when \nyou're certain the code is correct but not *quite* absolutely certain. \nPerhaps you've missed some odd corner case (we're all only human). In \nthis case an extra runtime check helps reassure you that any errors will \nbe caught as early as possible rather than in distant parts of the code.","name":"","extension":"txt","url":"https://www.irccloud.com/pastebin/bcvmmzT1","modified":1532975642,"id":"bcvmmzT1","size":803,"lines":13,"own_paste":false,"theme":"","date":1532975642}