<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>20735</bug_id>
          
          <creation_ts>2013-01-22 16:59:05 +0000</creation_ts>
          <short_desc>n not defined in sequence algorithm</short_desc>
          <delta_ts>2013-01-24 14:01:35 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebAppsWG</product>
          <component>WebIDL</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Marcos Caceres">w3c</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>jmdyck</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>w3c</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>81940</commentid>
    <comment_count>0</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2013-01-22 16:59:05 +0000</bug_when>
    <thetext>http://dev.w3.org/2006/webapi/WebIDL/#es-sequence

Where it says: 
[[
An IDL sequence value S0..n−1 of type sequence&lt;T&gt; is converted to an ECMAScript Array object as follows:
...
While i &lt; n:
]]

n is not defined to be the length of the sequence.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81945</commentid>
    <comment_count>1</comment_count>
    <who name="Michael Dyck">jmdyck</who>
    <bug_when>2013-01-22 17:10:04 +0000</bug_when>
    <thetext>When the spec introduces &quot;an IDL sequence value S&lt;sub&gt;0..n−1&lt;/sub&gt;&quot;, surely that &apos;binds&apos; both &apos;S&apos; and &apos;n&apos;: &apos;n&apos; is bound to the length of &apos;S&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>81949</commentid>
    <comment_count>2</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2013-01-22 17:17:55 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; When the spec introduces &quot;an IDL sequence value S&lt;sub&gt;0..n−1&lt;/sub&gt;&quot;, surely
&gt; that &apos;binds&apos; both &apos;S&apos; and &apos;n&apos;: &apos;n&apos; is bound to the length of &apos;S&apos;

sure, but it&apos;s more consistant with the other algorithms if n is explicitly defined in the algorithm itself. The spec defines &quot;Let n be the ...&quot; in 5 other places in the spec.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82045</commentid>
    <comment_count>3</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2013-01-24 07:15:51 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; sure, but it&apos;s more consistant with the other algorithms if n is explicitly
&gt; defined in the algorithm itself.

My intent was to use &quot;blah_0..n-1&quot; for list variables that algorithms use, and not for IDL values like sequences.  So I&apos;ve changed the three instances of &quot;blah_0..n-1&quot; that name or define IDL sequence values, but I&apos;ll leave the remaining ~10 uses of &quot;blah_0..n-1&quot; without an preceding definition of n when they&apos;re naming/defining lists.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>82082</commentid>
    <comment_count>4</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2013-01-24 14:01:35 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; (In reply to comment #2)
&gt; &gt; sure, but it&apos;s more consistant with the other algorithms if n is explicitly
&gt; &gt; defined in the algorithm itself.
&gt; 
&gt; My intent was to use &quot;blah_0..n-1&quot; for list variables that algorithms use,
&gt; and not for IDL values like sequences.  So I&apos;ve changed the three instances
&gt; of &quot;blah_0..n-1&quot; that name or define IDL sequence values, but I&apos;ll leave the
&gt; remaining ~10 uses of &quot;blah_0..n-1&quot; without an preceding definition of n
&gt; when they&apos;re naming/defining lists.

mkay, but note that the 0..n-1 seems overly fancy (when you are already working on n in the algorithms) and it&apos;s already confused me during implementation. Please try to avoid unnecessary &quot;mathematical-looking&quot; constructs in the spec to keep the spec as easy to read as possible.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>