[fpc-pascal] Illogical automatic dereferencing
Marco van de Voort
marcov at stack.nl
Sat Oct 10 20:14:48 CEST 2009
In our previous episode, "Vinzent Höfler" said:
> > One thing I think you don't understand is that an array _is_ a
> > pointer. Look at this table to visualise:
> >
> > http://en.wikipedia.org/wiki/C_syntax#Accessing_elements
>
> One thing I think you don't understand is that arrays and pointers are orthogonal concepts in almost every other programming language than C.
>
> So technically, C is the one who got it wrong.
Wrong and right are absolute terms. C chose a deliberate other way, mostly
based on the need to keep as little possible state in memory to be able to
compile an as large program as possible on early seventies hardware.
So from C's THEN requirements, it was sane. C has to live with the both the
advantage (looking at the huge unix codebase) and the disadvantage (the
sorry state of typing and importing) of being a production language right
from the start.
> Same for "Array subscript numbering begins at 0." - which simply isn't
> true for Pascal.
Except for dyn arrays, open arrays etc. See ISO pascal's conforming arrays.
More information about the fpc-pascal
mailing list