Hi Thomas,

Well it seems learning never stops!

Thank you (again) for your detailed explanation.

Here is the submitted bug:
http://bugzilla.qooxdoo.org/show_bug.cgi?id=7834

Regards
Dietrich

Am 30.10.2013 14:13, schrieb thron7:
> Hi Dietrich,
>
>
> "Dangling commas" in arrays are not only permitted in the ES spec, they
> have their own name, they're called "elisions". You can look at them as
> if an 'undefined' value had been inserted at this position in the array.
> So in that respect they are legal, and hence the lint job doesn't warn
> (But we could add an option to the lint-check to enable this, if you
> care to open a bug for it). The Generator also makes some effort to
> retain elisions in optimized code, exactly because of the length semantics.
>
> As for this array length issue, it really depends on which version of
> the ES spec you comparing against. The JS 1.5 spec says about elisions:
>
> "Array elements may be elided at the beginning, middle or end of the
> element list. Whenever a comma in
> the element list is not preceded by an AssignmentExpression (i.e., a
> comma at the beginning or after
> another comma), the missing array element contributes to the length of
> the Array and increases the index
> of subsequent elements. Elided array elements are not defined."
>
> In that light IE6-8 (IIRC) conform very closely to that specification.
>
> But the latest ES spec (ES, ed. 5.1) takes a slightly different approach:
>
> "Array elements may be elided at the beginning, middle or end of the
> element list. Whenever a comma in the
> element list is not preceded by an AssignmentExpression (i.e., a comma
> at the beginning or after another
> comma), the missing array element contributes to the length of the Array
> and increases the index of
> subsequent elements. Elided array elements are not defined. If an
> element is elided at the end of an array,
> that element does not contribute to the length of the Array."
>
> The two paragraphs are identical except there is an extra sentence at
> the end of the newer version. In that version elisions *at the end* of
> the array do not contribute to the array length. So in that light, more
> current browsers are right and are conformant to the newer spec. :-)
>
> HTH,
> T.
>
> ------------------------------------------------------------------------------
> Android is increasing in popularity, but the open development platform that
> developers love is also attractive to malware creators. Download this white
> paper to learn more about secure code signing practices that can help keep
> Android apps secure.
> http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Android is increasing in popularity, but the open development platform that
developers love is also attractive to malware creators. Download this white
paper to learn more about secure code signing practices that can help keep
Android apps secure.
http://pubads.g.doubleclick.net/gampad/clk?id=65839951&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to