Lies in education [was Re: The "loop and a half"]
Ben Bacarisse
ben.usenet at bsb.me.uk
Thu Oct 12 09:16:24 EDT 2017
Gregory Ewing <greg.ewing at canterbury.ac.nz> writes:
> Ben Bacarisse wrote:
>> That's a different type. I think you mean that a human writing C
>> (rather than bartc's code generator) would probably design the code to
>> use tokenrec ** then I agree, but the latter is not just a different way
>> to write the former.
>
> Yes, I was translating his English description of the type
> into C, using C's meaning of the word "array". It seems that
> arrays in the original language (Algol? One of Bart's
> inventions?) are somewhat richer things.
Probably, but you can have pointers to array types in C which is what
the posted type used. Humans pass arrays in C by passing a pointer to
the first element. Pointers to arrays therefore crop up when passing 2D
(or higher) arrays, even when the code is hand written by a person.
--
Ben.
More information about the Python-list
mailing list