Re:Again on 0-based vs. 1-based indexing
by nybble41 on Wednesday January 20, 2021 @04:16PM
(#25852101)
My point was that the natural procedure for computers is also more natural for humans, since it involves fewer special cases. Humans are better than computers at dealing with ad-hoc special cases but that doesn't make them natural.
Re:Again on 0-based vs. 1-based indexing
by TuringTest on Wednesday January 20, 2021 @05:18PM
(#25852714)
Having fewer special cases doesn't make it more natural, when those special cases are intuitive and forcing a single homogeneous process feels weird.
The brain is very good at finding patterns for special cases and very bad at following repetitive orders.
Anyway, to handle the exception, you could start the algorithm with a "check for the empty collection" base case; that would make it a natural definition for a computational recursive definition as well.