logoalt Hacker News

skydhashyesterday at 5:31 PM1 replyview on HN

Such comments rot so rapidly that they're an antipattern. Such assumptions are dangerous and I would point it out in a PR.


Replies

LegionMammal978yesterday at 5:36 PM

Do you not make such a tacit assumption every time you index into an array (which in almost all languages throws an exception on bounds failure)? You always have to make assumptions that things stay consistent from one statement to the next, at least locally. Unless you use formal verification, but hardly anyone has the time and resources for that.

show 1 reply