[Grace-core] talking generics with Gilad over lunch

Kim Bruce kim at cs.pomona.edu
Tue Nov 5 11:56:42 PST 2013


I agree with Andrew.  There are intriguing ideas here, but those can be handled in some extension that is out of scope for now.  I do think that are dialects will need to be able to have the capacity of changing the ASTs eventually (and this could support your type-like predicates), but it's not a high priority.

I'd say that for now we're best off having types look like types.  Other notations tend to obscure the code.  We need to keep Grace looking simple.  ... and different pluggable static type checkers can handle whatever type inference is desired for types left out (and that is likely a place where we'd like the checker to change the AST).  Right now, I'd be tempted to just handle if-then-else expressions as a special case for my simple type-checker and require everything else to include type annotations.  You of course could write a static type checker with different characteristics.  Let a thousand flowers (or type-checkers) bloom.

Kim



On Nov 5, 2013, at 10:28 AM, Andrew P Black <black at cs.pdx.edu> wrote:

> Remember our goal: a simple language for teaching, not so far out of the mainstream that it will scare the horses, I mean the instructors!
> 
> I think that this argues for wanting a special syntax for types that's ugly like other languages, just so that we can be ugly like other languages. But there is no reason that we can't translate that language into core Grace.
> 
> Types in Emerald were just objects — but objects with a particular signature.  There was a special syntax for creating such objects (the sub-language of types), and types created with this syntax were guaranteed to be decidable.   But you could, in principle, create other types out of whole cloth, and membership in such types might be undecidable.   This is quite like the idea that all Grace types are patterns, but not all patterns are types.
> 
> I think that we need to separate the researchy stuff on types from the simple language that we use for teaching.    If we can't do this, then we need to work more on the extension mechanisms.
> 
> 	Andrew
> 
> 
> _______________________________________________
> Grace-core mailing list
> Grace-core at cecs.pdx.edu
> https://mailhost.cecs.pdx.edu/mailman/listinfo/grace-core




More information about the Grace-core mailing list