<?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>26901</bug_id>
          
          <creation_ts>2014-09-25 10:25:24 +0000</creation_ts>
          <short_desc>Stop using &quot;octet&quot;</short_desc>
          <delta_ts>2014-12-05 16:45:46 +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>NEW</bug_status>
          <resolution></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="Anne">annevk</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>travil</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>112170</commentid>
    <comment_count>0</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-09-25 10:25:24 +0000</bug_when>
    <thetext>People are justifying using &quot;octet&quot; as terminology because IDL has it.

Per https://encoding.spec.whatwg.org#byte we standardize on byte.

So...

Perhaps avoid calling these bytes directly altogether, as we have ArrayBuffer and friends for that. &quot;short short&quot; and &quot;unsigned short short&quot;?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115946</commentid>
    <comment_count>1</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2014-12-04 18:37:00 +0000</bug_when>
    <thetext>We should just adopt the ES terms here. Int8, Uint8, etc. See http://people.mozilla.org/~jorendorff/es6-draft.html#sec-typedarray-objects</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115947</commentid>
    <comment_count>2</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-12-04 18:38:53 +0000</bug_when>
    <thetext>+1, the ES terms are easy to understand and pretty standard.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115948</commentid>
    <comment_count>3</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2014-12-04 18:49:01 +0000</bug_when>
    <thetext>(In reply to Tab Atkins Jr. from comment #2)
&gt; +1, the ES terms are easy to understand and pretty standard.

+2 :-)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115950</commentid>
    <comment_count>4</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-12-04 18:54:46 +0000</bug_when>
    <thetext>I dunno, I&apos;d rather do something more ambitious (we have another bug for it) where the only type is &quot;number&quot; and you use a restriction specifier for parameters like

foo(ClampBetween(0, 255) number bar)  // clamps to range
baz(EnsureBetween(0, 255) number bar) // throws outside range</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115960</commentid>
    <comment_count>5</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2014-12-05 00:44:29 +0000</bug_when>
    <thetext>Elsewhere [1], I proposed something like:

typedef Number[−128..127] Byte;

Having that would shrink the WebIDL spec significantly too ;) 

[1] https://github.com/heycam/webidl/issues/14</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115961</commentid>
    <comment_count>6</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-12-05 00:55:31 +0000</bug_when>
    <thetext>&quot;Byte&quot; is ambiguous - it means 8 bits, but doesn&apos;t specify how to interpret it.  Int8 and Uint8 have no such issue.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115962</commentid>
    <comment_count>7</comment_count>
    <who name="Marcos Caceres">w3c</who>
    <bug_when>2014-12-05 02:55:30 +0000</bug_when>
    <thetext>(In reply to Tab Atkins Jr. from comment #6)
&gt; &quot;Byte&quot; is ambiguous - it means 8 bits, but doesn&apos;t specify how to interpret
&gt; it.  Int8 and Uint8 have no such issue.

for sure, the point is just to have some syntax to declare ranges... we might be able to kill a whole bunch as they are probably not used in specs.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115966</commentid>
    <comment_count>8</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2014-12-05 08:32:35 +0000</bug_when>
    <thetext>&gt; we might be able to kill a whole bunch as they are probably not used in specs.

The following are used in specs as function arguments or writable attributes:

octet, short, unsigned short, long, unsigned long, long long, unsigned long long.

So the only unused one seems to be &quot;byte&quot;.  It&apos;s used for return values and constant values, but I don&apos;t see any obvious coercious to &quot;byte&quot; offhand.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115971</commentid>
    <comment_count>9</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-12-05 16:45:46 +0000</bug_when>
    <thetext>One problem with using the uint8 name is that in theory ES wants to add native int8/uint8/etc. types: https://github.com/nikomatsakis/typed-objects-explainer/blob/master/core.md#primitive-type-definitions. It would be confusing for WebIDL to mean something (very) different.

Still it&apos;d be nice to fix the problem in the OP, without having to first solve the whole ambitious reform-number-types idea. Not sure what to do.

(I plan to go comment on Marcos&apos;s GitHub issue with ideas for number types.)</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>