[m-rev.] for post-commit review: fix autopar feedback aborts

Zoltan Somogyi zoltan.somogyi at runbox.com
Thu Aug 15 11:05:33 AEST 2019



On Thu, 15 Aug 2019 10:48:59 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
> The diff looks fine.

Thank you.

> Doing so would (re)introduce an inconsistency to the interface to
> arrays.  Out-of-bounds indexes should *always* lead to an
> index_out_of_bounds exception or failure.

An out-of-bounds index *that is used* should lead to an exception.
An out-of-bounds index that is *not* used is more of a gray area.
"One off the end of an array" is treated specially by C, for example.

What I don't like about the current rules is that while fetch_items
does bounds checks, in this presumably reasonably common scenario
it requires its caller to do a bounds check as well. However, I don't
have *that* strong an opinion about it, so I will let it rest there.

Zoltan.


More information about the reviews mailing list