[Grace-core] collections interface for new classes

James Noble kjx at ecs.vuw.ac.nz
Thu Dec 10 20:54:55 PST 2015


On 11/12/2015, at 13:39pm, Kim Bruce <kbbruce47 at gmail.com> wrote:
> 
> But part of the reason for this was ambiguity (e.g., with <>).  If we fix the ambiguity problems then we can make the spacing optional.

or we can use spacing to “fix” the ambiguity problems 

> But right now we need rules in some cases — and in that case it’s easier to make them uniform.  I personally don’t teach the “a[i]” for lists, using a.at(i) instead.  If we do that and solve the generics problem then we could ease up on these.

<> for generics is ambiguous wrt < > as infix operators 
[ ] for generics is ambiguous wrt  [ ] as sequence brackets or/and postfix indexing

what else is there 
 - break syntactic symmetry between generic types and generic method calls
 - handle generics as subscripting
 - handle generics via an additional (optional) keyword   
       list (1, 2, 3)     
       list (1 ,2 ,3) of(Number) 

Jamese




More information about the Grace-core mailing list