<?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>27317</bug_id>
          
          <creation_ts>2014-11-13 17:50:20 +0000</creation_ts>
          <short_desc>Provide explicit guidance on enum value naming</short_desc>
          <delta_ts>2015-07-07 06:20:31 +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>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="David Dorwin">ddorwin</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>annevk</cc>
    
    <cc>bbirtles</cc>
    
    <cc>d</cc>
    
    <cc>hsivonen</cc>
    
    <cc>jackalmage</cc>
    
    <cc>mike</cc>
    
    <cc>mounir</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>steele</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>114893</commentid>
    <comment_count>0</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-11-13 17:50:20 +0000</bug_when>
    <thetext>It is not clear from http://heycam.github.io/webidl/#idl-enums how spec authors should name enum values, especially those that are composed of more than one word. The examples are all single words. &quot;enumeration-values&quot; might imply that dashes should be used to separate the words, but there seems to be uncertainty on this [1][2].

Please provide explicit guidance, including case and whether/how to separate words.

Existing and active specs are inconsistent but seem to tend toward use of dashes:
- Fetch is using a mix of concatenation and dashes:
   https://fetch.spec.whatwg.org/#requestcontext
- Screen Orientation is using dashes:
   https://w3c.github.io/screen-orientation/#orientationtype-enum
- Web Audio has one of each:
   http://webaudio.github.io/web-audio-api/
- WebRTC uses dashes:
   http://www.w3.org/TR/webrtc/

[1] http://lists.w3.org/Archives/Public/public-script-coord/2013OctDec/0184.html
[2] http://lists.w3.org/Archives/Public/public-script-coord/2014OctDec/0147.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114903</commentid>
    <comment_count>1</comment_count>
    <who name="Brian Birtles">bbirtles</who>
    <bug_when>2014-11-13 23:49:05 +0000</bug_when>
    <thetext>And in Web Animations we use dashes to match the corresponding CSS keywords:

  http://w3c.github.io/web-animations/#the-playbackdirection-enumeration</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>115077</commentid>
    <comment_count>2</comment_count>
    <who name="David Dorwin">ddorwin</who>
    <bug_when>2014-11-18 21:53:21 +0000</bug_when>
    <thetext>Can we definitively say whether there is a preference for dashes for new specs? I need to add some multi-word names to a spec, so it would be nice to know what is preferred. Thanks.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116075</commentid>
    <comment_count>3</comment_count>
    <who name="Joe Steele">steele</who>
    <bug_when>2014-12-09 22:04:23 +0000</bug_when>
    <thetext>Ping. This is blocking at least one bug in EME we would like to resolve.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116077</commentid>
    <comment_count>4</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2014-12-09 22:25:19 +0000</bug_when>
    <thetext>I have a slight preference for using dashes (or spaces, but probably too late for that) when we can.

Who else should weigh in here? We should get some advice added to the spec if there&apos;s agreement.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>116078</commentid>
    <comment_count>5</comment_count>
    <who name="Tab Atkins Jr.">jackalmage</who>
    <bug_when>2014-12-09 22:33:39 +0000</bug_when>
    <thetext>Yeah, let&apos;s just settle on dashes. More readable, and CSS is definitely going to be using dashes for anything they need.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117211</commentid>
    <comment_count>6</comment_count>
    <who name="Henri Sivonen">hsivonen</who>
    <bug_when>2015-01-15 12:54:37 +0000</bug_when>
    <thetext>I&apos;d like to request that this bikeshed be painted to completion ASAP. I can live with dashes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>117212</commentid>
    <comment_count>7</comment_count>
    <who name="Anne">annevk</who>
    <bug_when>2015-01-15 12:59:50 +0000</bug_when>
    <thetext>I think the conclusion is lowercase and either dashes or single word depending on the circumstances (e.g. ArrayBuffer becomes &quot;arraybuffer&quot;, not &quot;array-buffer&quot;). I recommend going with that as a general guideline for now. It will likely take some time before IDL is updated.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>121842</commentid>
    <comment_count>8</comment_count>
    <who name="Cameron McCormack">cam</who>
    <bug_when>2015-07-07 06:20:31 +0000</bug_when>
    <thetext>https://github.com/heycam/webidl/commit/344ad419defdcd8df313119abe85819e254a8afb</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>