Re: Static vs. Dynamic typing

From: Dmitry A. Kazakov (mailbox_at_dmitry-kazakov.de)
Date: 07/21/04


Date: Wed, 21 Jul 2004 10:07:25 +0200

On Tue, 20 Jul 2004 18:39 +0100 (BST), Dave Harris wrote:

> mchristoff@sympatico.caREMOVETHIS (Michael N. Christoff) wrote (abridged):
>>> You could have the declarations and still check them dynamically.
>>
>> If you had the declarations, why skip the compile-time check?
>
> One reason is that to check at compile time you need to know the types
> everywhere. Run-time checks would allow the declarations to be optional.
>
> Another reason is that in order to be statically decidable the type system
> has to be "weak", ie not Turing Complete,

Do you mean the type system or the whole system?

> yet at the same time it needs to
> be expressive. These goals conflict.

But full statical decidability is neither possible nor required. Statically
typed systems check only a part of what should/could be.

> You can have a more powerful and
> expressive type system if it doesn't need to be statically checkable.
> Probably simpler too.

That's questionable. We could think of types as a static component of the
whole system, while *all* dynamics of the system is represented by values.

[ That does not exclude types as values, which are represented in
statically typed languages as type tags used for dispatch. So it is not
clear, why excluding the static component altogether should alone make the
type system any better (in which sense, also). ]

The decisive question to be answered is how much truly dynamic types are
required in an average system, and to which degree dynamic polymorphism
conforms to.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


Relevant Pages

  • Re: Static vs. Dynamic typing
    ... > Another reason is that in order to be statically decidable the type system ... We could think of types as a static component of the ... while *all* dynamics of the system is represented by values. ... [That does not exclude types as values, ...
    (comp.object)
  • Re: Pole Shift Nonsense
    ... He is not immune to reason, ... rotational dynamics which define it and specifically the dynamics of ... 'Equatorial Bulge' and even if evolutionary geologists have still to ... that the Archaean spin axis lay in the ecliptic. ...
    (sci.geo.geology)