<?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>20361</bug_id>
          
          <creation_ts>2012-12-12 16:37:59 +0000</creation_ts>
          <short_desc>Grammar is wrong for serializers</short_desc>
          <delta_ts>2016-10-22 16:09:05 +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>MOVED</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="Robin Berjon">robin</reporter>
          <assigned_to name="Cameron McCormack">cam</assigned_to>
          <cc>bzbarsky</cc>
    
    <cc>d</cc>
    
    <cc>dom</cc>
    
    <cc>jl</cc>
    
    <cc>mike</cc>
    
    <cc>public-script-coord</cc>
    
    <cc>travil</cc>
          
          <qa_contact>public-webapps-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>80014</commentid>
    <comment_count>0</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-12-12 16:37:59 +0000</bug_when>
    <thetext>A serializer is supposed to be able to be:

   serializer identifier name();

But the syntax has that as serializer OperationRest. OperationRest does not include the identifier, so it needs to be added.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80015</commentid>
    <comment_count>1</comment_count>
    <who name="Robin Berjon">robin</who>
    <bug_when>2012-12-12 16:39:09 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; A serializer is supposed to be able to be:
&gt; 
&gt;    serializer identifier name();
&gt; 
&gt; But the syntax has that as serializer OperationRest. OperationRest does not
&gt; include the identifier, so it needs to be added.

Of course I would be more readable if I were awake. I meant

    serializer type identifier();

The type is not accounted for in the syntax.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>80479</commentid>
    <comment_count>2</comment_count>
    <who name="Dominique Hazael-Massieux">dom</who>
    <bug_when>2012-12-21 14:24:29 +0000</bug_when>
    <thetext>Maybe relatedly, the grammar prevents having a &quot;;&quot; (instead of mandating it) after an empty serializer declaration. 

interface Foo { serializer }; // valid according to the current grammar
interface Foo { serializer; }; // invalid according to the current grammar</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118866</commentid>
    <comment_count>3</comment_count>
    <who name="Jens Widell">jl</who>
    <bug_when>2015-03-23 11:59:46 +0000</bug_when>
    <thetext>The grammar also lacks support for the

  serializer = { attribute };

and

  serializer = { inherit, attribute };

variants.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118869</commentid>
    <comment_count>4</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-03-23 12:39:59 +0000</bug_when>
    <thetext>I still claim the entire serializer setup is overengineered.  Does anyone really want anything other than { attribute } for interfaces with no ancestors that have serializers or { inherit, attribute } for ones that have such ancestors?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118896</commentid>
    <comment_count>5</comment_count>
    <who name="Travis Leithead [MSFT]">travil</who>
    <bug_when>2015-03-24 13:55:57 +0000</bug_when>
    <thetext>(In reply to Boris Zbarsky from comment #4)
&gt; I still claim the entire serializer setup is overengineered.  Does anyone
&gt; really want anything other than { attribute } for interfaces with no
&gt; ancestors that have serializers or { inherit, attribute } for ones that have
&gt; such ancestors?

In IE, we&apos;ve only wanted (and implemented) this for the NavigationTiming [1] and related interfaces, in order to make it easy to package and serialize the attributes. +1 for potentially simplifying the grammar to remove use-cases until/unless we find a good reason for them.

[1] http://www.w3.org/TR/navigation-timing/#sec-navigation-timing-interface</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>118897</commentid>
    <comment_count>6</comment_count>
    <who name="Boris Zbarsky">bzbarsky</who>
    <bug_when>2015-03-24 14:07:57 +0000</bug_when>
    <thetext>In Gecko&apos;s case we use it for some of the timing stuff, but also for some WebRTC interfaces (RTCIceCandidate, RTCSessionDescription).  In any case, all those consumers want to serialize all the attributes.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>127923</commentid>
    <comment_count>7</comment_count>
    <who name="Domenic Denicola">d</who>
    <bug_when>2016-10-22 16:09:05 +0000</bug_when>
    <thetext>Consolidating serializer issues into a simplification issue at https://github.com/heycam/webidl/issues/188</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>