<?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>20535</bug_id>
          
          <creation_ts>2012-12-31 00:28:03 +0000</creation_ts>
          <short_desc>consider removing indexed property setters, creators and deleters</short_desc>
          <delta_ts>2017-12-06 11:15:23 +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>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>[v1]</status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Cameron McCormack">cam</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>annevk</cc>
    
    <cc>bzbarsky</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>robin</cc>
    
    <cc>tatj11</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80741</commentid>
    <comment_count>0</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-12-31 00:28:03 +0000</bug_when>
    <thetext>Array-like interfaces defined using indexed property setters, creators and/or deleters don&apos;t behave nicely.  They can&apos;t be used in conjunction with Array.prototype functions unless we require the interface to support sparse array indexes.  They also don&apos;t seem to be used (there are plenty of indexed property getters on the other hand).

There is at least this use of an indexed property deleter:

http://www.whatwg.org/specs/web-apps/current-work/multipage/dnd.html#the-datatransferitemlist-interface

but that is pretty weird and bad design anyway IMO.


If we can remove indexed property setters, creators and deleters then we can think about a solution for mutable array-like objects that work better with JS Arrays.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80742</commentid>
    <comment_count>1</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2012-12-31 00:29:13 +0000</bug_when>
    <thetext>See also https://mail.mozilla.org/pipermail/es-discuss/2012-December/027688.html for problems with [ArrayClass], which is related.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80783</commentid>
    <comment_count>2</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-31 06:48:07 +0000</bug_when>
    <thetext>HTMLOptionsCollection has an indexed setter/creator, and that&apos;s required for web compat.  I agree it&apos;s weird and bad design and generally crappy, but we can&apos;t get rid of it...

I&apos;m not sure offhand whether anything needs deleters for backwards compat, but I doubt it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80790</commentid>
    <comment_count>3</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-31 11:13:48 +0000</bug_when>
    <thetext>I missed HTMLOptionsCollection as it is not using the terms from IDL.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80798</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-31 17:47:23 +0000</bug_when>
    <thetext>Which terms, out of curiosity?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80800</commentid>
    <comment_count>5</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2012-12-31 18:57:51 +0000</bug_when>
    <thetext>&quot;indexed property setters&quot; and friends.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80801</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2012-12-31 19:03:11 +0000</bug_when>
    <thetext>For what it&apos;s worth, HTMLSelectElement also has an indexed setter/creator, also required for web compat.  I missed it in my scan last night because we haven&apos;t converted it to WebIDL yet.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80868</commentid>
    <comment_count>7</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2013-01-03 13:06:32 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; HTMLOptionsCollection has an indexed setter/creator, and that&apos;s required for
&gt; web compat.  I agree it&apos;s weird and bad design and generally crappy, but we
&gt; can&apos;t get rid of it...
&gt; 
&gt; I&apos;m not sure offhand whether anything needs deleters for backwards compat,
&gt; but I doubt it.

We can&apos;t get rid of what&apos;s needed for compat, but if we agree that they&apos;re bad design (which seems to be the case) we can rename them legacy* to flag the fact that they shouldn&apos;t be used for new APIs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80933</commentid>
    <comment_count>8</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2013-01-05 11:54:06 +0000</bug_when>
    <thetext>Filed bug 20570 and bug 20571 on HTML.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117335</commentid>
    <comment_count>9</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2015-01-20 06:48:38 +0000</bug_when>
    <thetext>I removed indexed property deleters:

https://github.com/heycam/webidl/commit/291dcc397f48029ac3954b2b0e511f4c14c7631d

Leaving this open for potentially renaming the rest to legacy*.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>129000</commentid>
    <comment_count>10</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2017-12-06 11:15:23 +0000</bug_when>
    <thetext>Above comment is now tracked by https://github.com/heycam/webidl/issues/100.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>