News for hackers. Stuff that matters.
Re:Again on 0-based vs. 1-based indexing by Mikhail_K on Wednesday January 20, 2021 @08:41AM (#25846284)
Negative indices are bug-prone. If you mess up iteration bounds, you should get an error, not silent incorrect indexing.
Re:Again on 0-based vs. 1-based indexing by robertlagrant on Wednesday January 20, 2021 @10:41AM (#25847695)
Can you give an example?
Re:Again on 0-based vs. 1-based indexing by Mikhail_K on Sunday January 24, 2021 @10:00AM (#25892536)
Sure. Let's take array elements in reverse, from m to m-n. Suppose n erroneously becomes larger than m. That should produce an error, not silently take several tailing elements.