[Grace-core] collections interface for new classes

Andrew P Black black at cs.pdx.edu
Thu Dec 10 16:36:06 PST 2015


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

>> Not requiring the second set of brackets is quite important,
> 
> Yes...
> Hopefully Michael can point out what the issue is...
> 
>> I think the issue is distinguishing between [ ] as an operator, ... and as a sequence denotation
> 
> Again yes
> 
>> 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.
> 
> Operators have to be delineated by spaces in Kernan - which I've now got used to and like: it does makes things easier to read. So one option is that indexing operators cannot be preceded by spaces, but literals must be. 

I think that space sensitivity is daft.  And using one rule for the * operator and the opposite rule for the  [] operator is dafter.  

Spaces around operator symbols do make the expression easier to read when there is only one operator and two operands.  But when you have a complex arithmetic expression, the effect is to make it harder to read, because it falls off the end of the line.  So this is something that I would rather leave up to the programmer to consider on a case-by-case basis.

	Andrew


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailhost.cecs.pdx.edu/pipermail/grace-core/attachments/20151210/922465ac/attachment.html>


More information about the Grace-core mailing list