Marko Rauhamaa <[email protected]> writes:

> It's perfectly fine to avoid errors by generalizing semantics so I
> wouldn't mind if you did what you propose. However, the dynamic type
> system is necessary for the simple fact that you will need to define
> runtime semantics.

Oh, I was rather looking at things from a low-level perspective.  E.g.
the "foo" string in my example was meant as a pointer, whose numeric
value plus 5 resulted in an integer whose underlying byte sequence is
then interpreted as an IEEE double.

In other words I was suggesting that "by default" there are only byte
sequences, and type systems help to work with these conveniently.

> No, the primary objective is not to prevent errors but to have
> well-defined semantics. Scheme, Python, C or Java would function
> perfectly well without any type error checking, static or dynamic. The
> results could be undefined or a burning computer, that doesn't matter.
> What matters is that you know what a well-defined program is supposed
> to do.

I think I understand your viewpoint, and it also makes sense: types
might not be essential to bit-crunching, but they are to abstract models
of computation.

> However, in my extensive practical experience, a static type system,
>
>  [...]

Does that experience cover languages like SML, Ocaml, and Haskell?  (Not
a rhetorical question, though I suspect it doesn't; at least not as much
as languages like C, C++, and Java.)

Taylan

Reply via email to