[Grace-core] another ambiguity in the grammar

Kim Bruce kim at cs.pomona.edu
Sun Mar 25 14:55:55 PDT 2012


It shouldn't allow either!  Why is [ ] used for indexing collections?  Messages of the form get(i) seem perfectly fine to me.  I dislike the inconsistency in Java of accessing arrays differently from any other collection!

As we've also discussed, I'm not in favor of [a,b,c] for collection literals.  I'd rather write new List(a,b,c).

Kim



On Mar 25, 2012, at 2:07 PM, James Noble wrote:

> The spec currently allows (and minigrace supports)
> the [] operator method to index collections
> and [1,2,3] collection literals
> 
> so what's this a[1] indexing a, or calling a passing the literal collection [1]
> 
> James
> _______________________________________________
> 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