Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nitpick: the index could come from program input. For example:

- if one were to write ‘ed’ in C++, that could be the code that handles going to the n-th line.

- in a lzw decompressor, it could be an integer read from the to-be-decompressed data stream.

In both cases, using at rather than doing a range check first can be defended because failing the range check is an exceptional case.



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

Search: