[Grace-core] Should Grace abandon "gradual typing" for "like typing"?

James Noble kjx at ecs.vuw.ac.nz
Wed Jul 27 09:43:12 PDT 2016


On 28/07/2016, at 4:12AM, Kim Bruce <kbbruce47 at gmail.com> wrote:

> Let's not rush into anything just yet. What we have now is OK, but needs more work. 

yep. In fact this says more implementation work, but not more design work.
We just steal Jan's design - perhaps only half of it).

> I'd like to have a good static type system

absolutely

> & then see if we can blend it nicely with the dynamic. I'm getting the feeling that contracts & blame may be too much, for minimal benefit,

like types do just this - for a suitable definition of "nicely".

But the only way you can determine a dynamic type error won't happen with any given unit of code is that Unknown is **never** used - explicitly or implicitly -  anywhere in the entire system. 

which is where the really nasty type inference question comes in:
remember that in code like this:

object { 
 def x is public = (if (flag) then {true} else {false})
}

x has *dynamic* type Unknown. 

> but I won't be able to think about this for at least 10 days. 

enjoy your break!

James




More information about the Grace-core mailing list