Re: [webidl] Fix arrays (#52)

>              </p>
> -            <div class='note'>
> -              <p>
> -                Interfaces using <a class='xattr' href='#ArrayClass'>[ArrayClass]</a> will
> -                need to define a “length” <a class='dfnref' href='#dfn-attribute'>attribute</a>
> -                of type <span class='estype'>unsigned long</span> that exposes the length
> -                of the array-like object, in order for the inherited <span class='estype'>Array</span>
> -                methods to operate correctly.  Such interfaces would typically also
> -                <a class='dfnref' href='#dfn-support-indexed-properties'>support indexed properties</a>,
> -                which would provide access to the array elements.
> -              </p>
> -            </div>
> +            <ol class='algorithm'>
> +              <li>Let <var>values</var> be the result of
> +                <a class='dfnref' href='#dfn-convert-ecmascript-to-idl-value'>converting</a>

Hmm, so in what way are they different, apart from doing the iterable check up front (before doing it again in the "convert to sequence<T>" algorithm)?

Maybe it's better to just call into the "convert to sequence<T>" and "convert to FrozenArray<T>" algorithms directly here from the union conversion algorithm. That would still have some duplicate processing (we'd check for Date/RegExp twice now, rather than checking for iterability twice) but at least would capture any changes we make to those two algorithms without needing to change anything here.

---
Reply to this email directly or view it on GitHub:
https://github.com/heycam/webidl/pull/52/files#r33908055

Received on Monday, 6 July 2015 06:14:27 UTC