[Grace-core] New version pushed

Kim Bruce kim at cs.pomona.edu
Thu Aug 28 17:55:46 PDT 2014


Sounds good!

I'm trying to use exclusively Tim's editor at this point in order to further test everything for classes.  Let me know when these changes are available there.

Kim



On Aug 28, 2014, at 5:49 PM, Andrew P. Black <black at cs.pdx.edu> wrote:

> I just pushed a new version of Minigrace to http://web.cecs.pdx.edu/~grace/minigrace/js/
> 
> This is mostly cleanup, implementing a number of the changes that we agreed to on Monday.  Notably, Types now have a ‘methodNames’ method, which answers a set, you so can ask what methods are in a type.  Any object’s mirror also has a method methodNames, which also answers a set.  So, you can see why an object does not have a particular type.  For example:
> 
> import "mirrors" as m
> def seq = sequence.with(2,3,4)
> match (seq)
>    case { l:collections.List -> print "{l} is a list — but shouldn't be!" }
>    case { s:collections.Sequence -> print "{s} is a sequence" }
>    case { _ -> print "we should never get here" }
> 
> print "The following list methods are not in sequence:"
> def missing = collections.List.methodNames -- m.reflect(seq).methodNames
> for (missing.asList.sort) do { 
>    each -> print "    {each}"
> }
> 
> 
> built-in lists are gone, which means that the list that you get back from various built-in methods should actually be real lists.   The variable arity parameter of a variable arity method is now a real sequence.   Done is the Top type, above Object.  
> 
> 	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