Good point re the overloading ',' between separating islist modifier items and separating params - I missed that entirely.
Agree its reasonable/necessary to have ',' as param decl separator, desirable to continue to use as comma separated list as elsewhere.
Its not insurmountable though the options may be somewhat clumsy.
- multiple islist attributes in '()' - necessary here, optional elsewhere
- Code: Select all
def method(x as String is (inout, unused), y as String is unused)
( perhaps this is acceptable given the relative lack of use for multiple items currently/so far)
- explicit terminator
- Code: Select all
def method(x as String is inout, unused|, y as String is unused)
def method(x as String is inout, unused: , y as String is unused)
def method(x as String is inout, unused, stop, y as String is unused)
- whitespace significant
- Code: Select all
def method(x as String is inout, unused , y as String is unused)
The benefit of separating out attributes is it delineates language supported (or backend language translatable) attributes/modifiers ('private, shared') from environmental ('Conditional("Debug"')' ) ones which I think is valuable.
Mechanism wise I agree there's no real difference.
Re the 'is' ambiguity - I agree with the use in an expression (identity) and current use as a keyword prefix
- anyway thats totally resolved ( without a 'tie-breaker' choice) by fixing/correcting the order of clauses so that the ambiguity doesn't occur - see the latter patches under that bug report.
Dropping the 'is' keyword and commas also looks strange/retrograde/ugly to me.
I think 'is' works well for modifiers and (existing) 'has' for attributes - the problem here ( in params) is the overloading of ','
OTOH I like the comma sep list elsewhere.
Total agreement re changes for a preferred form vs supporting current syntax .