What is a type error?

Marshall marshall.spight at gmail.com
Fri Jul 14 04:03:16 EDT 2006


George Neuner wrote:
> On 13 Jul 2006 08:45:49 -0700, "Marshall" <marshall.spight at gmail.com>
> wrote:
> >
> >On the other hand, there is no problem domain for which pointers
> >are a requirement. I agree they are deucedly convenient, though.
> >
>
> I would argue that pointers/references _are_ a requirement for I/O.  I
> know of no workable method for interpreting raw bits as meaningful
> data other than to overlay a typed template upon them.

I think I know what you mean. I agree that pointers are necessary
for, e.g., device drivers. So I have to weaken my earlier statement.


> Categorically disallowing address manipulation functionally cripples
> the language because an important class of programs (system programs)
> cannot be written.

That's fair, although I could argue how important systems programming
is these days. (And C/C++ are cock-of-the-walk there anyway.)


> Of course, languages can go overboard the other way too.  IMO, C did
> not need to provide address arithmetic at the language level,
> reinterpretable references and array indexing would have sufficed for
> any use.  Modula 3's type safe view is an example of getting it right.
>
> It is quite reasonable to say "I don't write _____ so I don't need
> [whatever language feature enables writing it]".  It is important,
> however, to be aware of the limitation and make your choice
> deliberately.

Agreed.


Marshall




More information about the Python-list mailing list