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
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
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;
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
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
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