[Grace-core] Typed Imports

Andrew P. Black black at cs.pdx.edu
Sun Nov 25 12:19:35 PST 2012


On 21 Nov 2012, at 21:32, James Noble wrote:

> "import "foo" as A" to declare foo via local type inference, we should support "import "foo" as A : T"
> to import foo bound to A but with static type T.  If it turns out foo doesn't satisfy type T, we raise a compile time
> or bind-time error. 


I agree that this is a good idea.  But you had a better syntax for this:

import A = "foo"
import A:T = "foo"

This is more closely analogous to def iii = 3 and def iii:Number = 3, and gives us back the keyword "as" to be an identifier.

	Andrew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailhost.cecs.pdx.edu/mailman/private/grace-core/attachments/20121125/f2b22cd1/attachment.html>


More information about the Grace-core mailing list