[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Typing and semantics [dynamic vs. static typing]
On Dec 17, 2003, at 4:05 PM, Ken Shan wrote:
> On 2003-12-17T15:32:19-0500, John Clements wrote:
>> In Haskell, as I understand it, there are a certain number of cases in
>> which these parts of the program will _not_ be sufficient to determine
>> what's going to happen next. In particular, I have to examine the
>> proof of the program--the whole program--to see how things were
>> resolved in order to figure out what's going to happen next.
> Perhaps it is relevant for me to point out that you don't have to
> examine the type proof for the -whole- program to know the operational
> behavior of the expression you are interested in. You only need to
> (1) the typing environment, just like in ML, and (2) the type assigned
> to the expression you are interested in. Item (2) is just as local
> as (1). For example, in order to know what an occurrence of "read"
> does in a program, I only need to know the typing environment for that
> occurrence of "read" and the type assigned to that "read"
> That's the coherence and non-ambiguity guarantee of the type class
Determining (2) can only be done by unification over the whole program,
Do type classes set up unification boundaries?