Re: Static vs. Dynamic typing
From: Dmitry A. Kazakov (mailbox_at_dmitry-kazakov.de)
Date: 07/26/04
- Next message: Gerry Quinn: "Re: Rework [Was: Static vs. Dynamic typing...]"
- Previous message: Oliver Plohmann: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- In reply to: Dave Harris: "Re: Static vs. Dynamic typing"
- Next in thread: Michael N. Christoff: "Re: Static vs. Dynamic typing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 26 Jul 2004 10:18:57 +0200
On Sat, 24 Jul 2004 19:54 +0100 (BST), Dave Harris wrote:
> mailbox@dmitry-kazakov.de (Dmitry A. Kazakov) wrote (abridged):
>>> 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?
>
> Just the type system.
But should it be Turing Complete?
>>> 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.
>
> Well, consider Eiffel's Design by Contract. It's a dynamically checked
> system, which means it can express truths which a simple static type
> checker could not prove.
Should be contracts mapped to types, or rather types are just a part of
contracts. There is a beauty in equalizing both, but I am not sure whether
it is feasible. Anyway nobody argues against things that cannot be checked
statically. So far people are arguing that nothing should be done
statically even if it could be. That's silly.
>> We could think of types as a static component of the whole system,
>> while *all* dynamics of the system is represented by values.
>
> Err, yes. I'm not sure what your point is.
Then you would need no dynamic type checks, because everything could be
checked statically. In my understanding it is always possible to do so.
When dynamic types come into consideration in a statically typed language,
then it is always related to large open-end systems, which require
enhancements during their life-circle. That is the rationale for
dynamically polymorphic types, IMO. Now when the dynamic camp tries to put
everything in a big dynamic cauldron, what remains from types then? Isn't
it just a camouflaged desire to deal with untyped values?
>> 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.
>
> I'd like more experience with hybrid static/dynamic systems. Sometimes
> with OLE/COM, for example, it feels like individual modules are statically
> checked, but the interfaces between them are dynamically checked. You find
> out whether a given object conforms to the interface you want at run-time,
> by using QueryInterface. Maybe that's a good mix (if given some decent
> syntax).
Yes it is much as I see it. Though, I'd like to describe interfaces in a
kind of meta-language, which again would be statically typed. The values of
that language would be types and values of the first level language. As I
said earlier, I do not believe that one could deal with that in *one*
language. In my view, as the systems will grew in size, we will experience
higher levels of this hierarchy: interfaces between interfaces etc.
Probably each level will need a *statically* typed language of its own.
> I've argued previously that static checking works best in the
> small, and becomes increasingly painful the bigger the project.
Divide and conquer!
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de
- Next message: Gerry Quinn: "Re: Rework [Was: Static vs. Dynamic typing...]"
- Previous message: Oliver Plohmann: "Re: Migrating a system incrementally. Was: Re: Static vs. Dynamic typing (big advantage or not)---WAS: c.programming: OOP"
- In reply to: Dave Harris: "Re: Static vs. Dynamic typing"
- Next in thread: Michael N. Christoff: "Re: Static vs. Dynamic typing"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|