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

Andrew P. Black black at cs.pdx.edu
Thu Jul 28 08:26:38 PDT 2016


Hi James,

Why do you say that inferring type parameters (which I think is what you mean by “populating the retained generic parameters via inference”) changes the operational semantics?

Yes, it does this when you reflect on the available type information.   In that sense, α-renaming changes the operational semantics too, since you can observe the change in variable name and change behavior accordingly.

Yes, it also does this if we want “precise exceptions”, because inference will potentially replace a NoSuchMethod Exception at some point in a program with a TypeError at an earlier point.   

I think that we have agreed that these are both OK things to do.

I believe that the case you are worried about is when type inference creates a TypeError in a program that would not have raised a NoSuchMethod Exception (e.g, because the “bad” value is never used).  Is that right?   Arn’t such errors part of the cost of doing business with types?

	Andrew

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


More information about the Grace-core mailing list