Today Derrell Lipman wrote: > On Thu, May 29, 2008 at 9:21 AM, Tobias Oetiker <[EMAIL PROTECTED]> wrote: > > > Experts, > > > > coming from a perl background, I like to write my lists like this > > > > var list = [ > > key1: value1, > > key2: value2, > > ]; > > > > Note the final comma. The advantage of this is that I never have > > missing commas when enhancing a list. > > > > Javascript seems to have nothing against this practice. The qooxdoo > > treegenerator.py does not like it though. Is there anything that > > can be done about this? Apart from not having that final comma? > > > I would sure prefer this change, too. I find myself tracking down these > extra commas most times I have to do a build and I actually try to think > about removing them when I'm coding. The error messages generated because > of these are recognizable by those of us who see them frequently, but > they're difficult for newbies to comprehend. Much better, I think, would be > to just ignore the superfluous commas.
An another poster suggested that IE6 may have problems with these trailing comas (I have not tested). So maybe the compiler could even remove them at build time. This would help both, humans while writing and browsers while running. tobi -- Tobi Oetiker, OETIKER+PARTNER AG, Aarweg 15 CH-4600 Olten http://it.oetiker.ch [EMAIL PROTECTED] ++41 62 213 9902 ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ qooxdoo-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
