Re: [fpc-pascal] Do you get type errors?

2010-06-20 Thread Jürgen Hestermann
Now, it is easy for the compiler to guess such cases. I don't want the compiler to "guess" at all. Some languages perform automagic deferencing of pointers to structured types (record/object, array), meaning eg p.x is interpreted as p^.x and p[i] is interpreted as p^[i

Re: [fpc-pascal] Do you get type errors?

2010-06-20 Thread Marco van de Voort
In our previous episode, spir said: > For sure! > Now, it is easy for the compiler to guess such cases. Some languages perform > automagic deferencing of pointers to structured types (record/object, array), > meaning eg > p.x > is interpreted as > p^.x > and > p[i] > is interpre

Re: [fpc-pascal] Do you get type errors?

2010-06-20 Thread spir
On Sun, 20 Jun 2010 16:07:08 +0200 Jürgen Hestermann wrote: > e:) > > * What is type checking _actually_ useful for? > > I would be lost without type checking, > especially when using sophisticated data structures > like pointers to arrays of records (which again > contain pointers to other comp

Re: [fpc-pascal] Do you get type errors?

2010-06-20 Thread Jürgen Hestermann
e:) * What is type checking _actually_ useful for? I would be lost without type checking, especially when using sophisticated data structures like pointers to arrays of records (which again contain pointers to other complex structures). An example: type ArrayType = array[1..10] of SomeType;

Re: [fpc-pascal] Do you get type errors?

2010-06-20 Thread Vinzent Höfler
spir : > Theoretically speaking, I'm all for type checking; and for programming > discipline in general. But in practice I never get type errors. Then you are either a genius or you are using not enough types. ;) > So, a few questions: > * Do you get type errors? Occasionally, yes. > (playing

[fpc-pascal] Do you get type errors?

2010-06-20 Thread spir
Hello, Theoretically speaking, I'm all for type checking; and for programming discipline in general. But in practice I never get type errors. What the compiler complains about is all kinds of plain grammatical errors: * typos * missing ';' (many) * wrong number of 'end' * name error * signature