points by Woodi 3 days ago | 0 comments
Current contract proposition is quite stupid.
It's just another syntax for 'if' and sentence in spec that they wish it for "program bugs".
Some languages have pre/post conditions and use it for wrapping function call with pre/post functions that do something. Useful in Emacs when you can tweak your config a bit. But do not crash application.
Some languages have condition that limit when function/method is called eg. for x > 5 is called one function and for rest numbers another function. Useful, cost runtime check but do not crash app. eg. your F35 in the middle of the air...
And from all possible things they choose to do plain asserts crash...
Aún no hay comentarios.