[Grace-core] Typed Imports

James Noble kjx at ecs.vuw.ac.nz
Mon Nov 26 02:22:04 PST 2012


On 26/11/2012, at 09:19 AM, Andrew P. Black wrote:

> 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.

so I talked about this with Michael - he pointed out that after 

def A = "foo" 

then, well, A == "foo"

with import A = "http://grace-lang.org/modules/foo.module" 

A != "http://grace-lang.org/modules/foo.module"  

the important think seems to be keeping both the A (imports types)  and A : T (ascribes types) forms...

J




More information about the Grace-core mailing list