[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Does PIL (3rd edition) repeatedly misuse the length operator on tables and invoke undefined behavior?
- From: Tim Hill <drtimhill@...>
- Date: Wed, 17 Sep 2014 15:40:17 -0700
On Sep 17, 2014, at 1:48 PM, Coda Highland <chighland@gmail.com> wrote:
>
> I'm pretty sure you missed my point. The definition in the 5.2 manual
> DOES explicitly say that an empty table has a length of 0. It doesn't
> special-case it, but that IS a consequence of the definition
> presented. It's not "you can assume it" -- it's "it's guaranteed." The
> wording isn't ambiguous, just complicated.
>
Well it is if you assume that "(1..n)" is some sort of math interval (but shouldn’t it use square brackets if its inclusive?). To my mind any document that is a “reference” should be definitive, unambiguous, and clear. I think the definition of # meets the first two criteria, but maybe misses on the last (hence this thread).
—Tim