[Grace-core] minor language issues

James Noble kjx at ecs.vuw.ac.nz
Wed May 13 23:36:33 PDT 2015


Hi all

Michael and I have been going through parsing as part of
working over the whole spec that we're finally getting to:

a few smallish issues:

- should spaces be required around operators?
  e.g. should "1+2" be legal, or should we be required to write "1 + 2".
  requiring spaces solves a bunch of issues wrt brackets & generics

- should more than statement be permitted on a line?
  e.g. should "a;b;c;" be legal, or should we have to break the lines, thus:
    a
    b
    c 
 
- there's no way to pass *no* varargs parameters. 
given a multi-part method with varargs we can't call then with
no arguments, because "()" is supposed to be illegal.

e.g. x.foo(1) foo(11)  and x.foo(1,2) foo(11,22) are both legal, but x.foo() foo()  is not. 

We don't have this problem with single-part requests because x.foo(1)  and  x.foo are both legal requsts

I don't think operator requests can take varargs.

James


More information about the Grace-core mailing list