[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Why Lua allow an extra comma after the last element of a table?
- From: William Ahern <william@...>
- Date: Sun, 10 Mar 2013 16:54:22 -0700
On Sun, Mar 10, 2013 at 03:15:34PM -0700, Eric Wing wrote:
> >> Why the last comma is allowed?
> >
> > Note that this is allowed in C too (I tend to find out that many C/C++
> > programmers don't know about it).
>
> I think that wasn't standardized until C99.
>
ANSI C89 / ISO C90 allowed trailing commas in initializer lists. It forgot
to allow them in enumeration lists, however. This is what C99 fixed.