History of trailing comma in programming language grammars
Many programming languages allow trailing commas in their grammar following the last item in a list. Supposedly this was done to simplify automatic code generation, which is understandable.

As an example, the following is a perfectly legal array initialization in Java (<a href="http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.6">JLS 10.6 Array Initializers</a>):

    int[] a = { 1, 2, 3, };

I'm curious if anyone knows which language was first to allow trailing commas such as these. Apparently C had it <a href="http://www.lysator.liu.se/c/ANSI-C-grammar-y.html#initializer">as far back as 1985</a>.

Also, if anybody knows other grammar "peculiarities" of modern programming languages, I'd be very interested in hearing about those also. I read that Perl and Python for example are even more liberal in allowing trailing commas in other parts of their grammar.
History of trailing comma in programming language grammars
===

Many programming languages allow trailing commas in their grammar following the last item in a list. Supposedly this was done to simplify automatic code generation, which is understandable.

As an example, the following is a perfectly legal array initialization in Java (<a href="http://java.sun.com/docs/books/jls/third_edition/html/arrays.html#10.6">JLS 10.6 Array Initializers</a>):

    int[] a = { 1, 2, 3, };

I'm curious if anyone knows which language was first to allow trailing commas such as these. Apparently C had it <a href="http://www.lysator.liu.se/c/ANSI-C-grammar-y.html#initializer">as far back as 1985</a>.

Also, if anybody knows other grammar "peculiarities" of modern programming languages, I'd be very interested in hearing about those also. I read that Perl and Python for example are even more liberal in allowing trailing commas in other parts of their grammar.