[Grace-core] collections interface for new classes

Andrew P Black black at cs.pdx.edu
Thu Dec 10 13:18:34 PST 2015


On 10 Dec 2015, at 7:03, James Noble <kjx at ecs.vuw.ac.nz> wrote:

> (note that kernan currently requires "list ([a,b,c])” rather than “list [a,b,c]” - Michael, what’s the issue there?) 

Not requiring the second set of brackets is quite important, and in accord with the rule that already-delimited expressions, like “quoted strings”, don’t require additional delimiters.

I think the issue is distinguishing between [ ] as an operator, as in a[i] being a synonym for a.at(i), and as a sequence denotation, where a[i] would be a request of method a on the argument (sequence containing i).

Two simple solutions are to keep [ ] as an operator, and use something else (like ⟨ ⟩) for sequences, or to appropriate [ and ] for sequences and remove them from the set of available operators.

	Andrew




More information about the Grace-core mailing list