[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dynamic vs. static typing

On Wednesday, November 26, 2003, at 02:06 PM, Anton van Straaten wrote:
> John Clements wrote
>>> With highly abstract code, it's often possible to do a better
>>> job of error reporting by providing additional information
>>> when specializing the code.  I suppose one type system
>>> equivalent would simply be to provide explicit annotations,
>>> thus possibly losing both polymorphism and inferencing.
>>> Are there better options?
>> I don't see why explicit annotations should cost you polymorphism.
> What I meant was what happens in an expression in which a variable has 
> a
> polymorphic type, where if you're forced to annotate it with an 
> explicit
> type, the expression becomes specific to that type.  You'd then need to
> elaborate specific versions of that expression for every type you need 
> to be
> able to handle.

Umm, I think FX-91 had the ability to describe non-let-bound, 
explicitly polymorphic expressions that would implicitly project onto 
the appropriate types when you wrote a procedure application expression.

I don't remember what sort of interference with the type inference 
system this introduced though.