http://d.puremagic.com/issues/show_bug.cgi?id=2477





------- Comment #2 from [EMAIL PROTECTED]  2008-11-30 19:38 -------
Thanks for the spec digging, Stewart.  So I see three options:

1) change the ArrayMemberInitializations production to:

ArrayMemberInitializations:
        ArrayMemberInitialization
        ArrayMemberInitialization , ArrayMemberInitializations

(get rid of the trailing comma case for initializations)

2) change the ArrayLiteral productions to 

ArrayLiteral:
        [ ArrayLiteralMemberList ]

ArrayLiteralMemberList:
        AssignExpression
        AssignExpression ,
        AssignExpression , ArrayLiteralMemberList

3) Just make all argument lists have an optional trailing comma.  This is based
on the thinking that if allowing a trailing comma is a nice feature for arrays,
then why not general argument lists (which can be used as general array
constructors with typesafe variadic A[]... style parameters.)?

ArgumentList:
        AssignExpression
        AssignExpression ,
        AssignExpression , ArgumentList

I vote for #2.


-- 

Reply via email to