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

Andrew P. Black black at cs.pdx.edu
Wed Jul 27 10:02:59 PDT 2016


> On 27 Jul 2016, at 9:43, James Noble <kjx at ecs.vuw.ac.nz> wrote:
> 
> object { 
>     def x is public = if (flag) then {true} else {false}
> }
> 
> x has *dynamic* type Unknown. 

This statement doesn’t make sense.  Code does not have a dynamic type; objects have a dynamic type.

The object generated by the above code has dynamic type 

	interface {
		x -> Boolean
	}

What its static type is depends on how much type inference we do.  Right now, the static type of the expression is Unknown, but it doesn’t seem so hard to make it the above interface type.

More generally: what is the point that you were intending to make with the above example?

	Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20160727/a9c8642a/attachment.html>


More information about the Grace-core mailing list