<?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>17181</bug_id>
          
          <creation_ts>2012-05-25 09:59:01 +0000</creation_ts>
          <short_desc>[XPath 3.0] Terminology: &quot;Restricted Union Type&quot;</short_desc>
          <delta_ts>2013-06-19 09:18:26 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>XPath / XQuery / XSLT</product>
          <component>XPath 3.0</component>
          <version>Last Call drafts</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</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="Michael Kay">mike</reporter>
          <assigned_to name="Jonathan Robie">jonathan.robie</assigned_to>
          
          
          <qa_contact name="Mailing list for public feedback on specs from XSL and XML Query WGs">public-qt-comments</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68107</commentid>
    <comment_count>0</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-05-25 09:59:01 +0000</bug_when>
    <thetext>The specification currently uses the term &quot;restricted union type&quot; to mean, in effect, a union type that is not derived by restriction. This seems extremely confusing, since a reader could easily assume that it means exactly the opposite. 

I propose that the concept should be renamed &quot;constructed union type&quot;, since a union type that is not derived by restriction is always derived by construction. The term doesn&apos;t capture 100% of the semantics, because it is also required that any union types among the member types of the union are also constructed union types, but it&apos;s much less likely to be misunderstood.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68158</commentid>
    <comment_count>1</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-05-25 22:15:27 +0000</bug_when>
    <thetext>I&apos;ve always disliked the term &quot;restricted union type&quot; for just this reason.

Ideally, I&apos;d like a name that evokes what is said in the definition:

[Definition: A restricted union type is an XML Schema union type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, (3) no type in the transitive membership of the union type has {variety} list, and (4) no type in the transitive membership of the union type is a type with {variety} union having a non-empty {facets} property].

To me, the proposed name doesn&apos;t do that. I suppose the name should ideally say something like &quot;no lists, no facets&quot;. To me, &apos;constructed&apos; doesn&apos;t say that.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68860</commentid>
    <comment_count>2</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-06-07 21:57:08 +0000</bug_when>
    <thetext>Current thoughts:

1. I think this is editorial.
2. I think we can change the term any time we come up with a good one.
3. Maybe we should bite the bullet and choose a wordy but descriptive term?

[Definition: A *list-free and facet-free union type* is an XML Schema union type that satisfies the following constraints: (1) {variety} is union, (2) the {facets} property is empty, (3) no type in the transitive membership of the union type has {variety} list, and (4) no type in the transitive membership of the union type is a type with {variety} union having a non-empty {facets} property].</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68915</commentid>
    <comment_count>3</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2012-06-11 15:22:21 +0000</bug_when>
    <thetext>It depends what you mean by &quot;editorial&quot;. If you mean, we can change this without affecting the syntax or semantics of the language, then yes it is editorial. If you mean, we can change this without involving the WG in the discussion, then no, I think the choice of formal terminology is more important than that. For example, the terms we use in the spec are likely to be reflected in text books and in error messages issued by products, and as such have a direct bearing on the usability of the language. 

Your proposed term feels unwieldy, and feels like an attempt to make the term self-explanatory, which seems doomed to failure (for example, it doesn&apos;t capture the fact that you can&apos;t have lists anywhere, but you can have facets at the level of an atomic type). It&apos;s also negative: it says what is outside the class rather than what is inside it.

The essence of this kind of union type is that its value space is the mathematical union of the value spaces of one or more atomic types. I&apos;m inclined to go for simple adjective that has no intrinsic meaning but that isn&apos;t already in use, and that reflects the fact that we&apos;re dealing with a subset of all union types that has very simple properties: perhaps a &quot;pure union&quot;. I&apos;d stlll like to leave &quot;constructed union&quot; on the table, however.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>68997</commentid>
    <comment_count>4</comment_count>
    <who name="Jonathan Robie">jonathan.robie</who>
    <bug_when>2012-06-12 16:09:21 +0000</bug_when>
    <thetext>The WG has decided on the term &quot;pure union type&quot;.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>