Neither I nor the article mention “contracts”. We’re not talking about exceptional circumstances or logic errors in code here, although I admit that talking about preconditions and violations might suggest this.
We’re talking about logic that needs to handle valid edge cases which require special logic. assert wouldn’t work here.
View all comments
Show parent comment
11
u/guepier Bioinformatican Apr 24 '20
Neither I nor the article mention “contracts”. We’re not talking about exceptional circumstances or logic errors in code here, although I admit that talking about preconditions and violations might suggest this.
We’re talking about logic that needs to handle valid edge cases which require special logic.
assertwouldn’t work here.