Hacker News new | past | comments | ask | show | jobs | submit login

> If there is not enough evidence available to the compiler that a particular array lookup is not safe, then that evidence is also not available to the programmer.

That's quite wrong. Humans are capable of deductions that compilers, which must necessarily use conservative, constructive methods, can't dream of. They can also have information that isn't available to a compiler even in principle, although this is less likely to apply to eliminating bounds checking.




Yes, and programmers on a development team change with time, taking their knowledge with them.

So the next guy touching the code just makes the code blow up, due to wrong assumptions.


It's worded quite strongly, but the programmer can only be certain that a certain bounds check is guaranteed to succeed if the compiler agrees. In other situations something about the current context may allow a bounds check to pass, but the "current context" is always bound to change in any sufficiently complicated program.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: