<?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>29612</bug_id>
          
          <creation_ts>2016-05-06 09:27:23 +0000</creation_ts>
          <short_desc>[FO31] Function argument naming</short_desc>
          <delta_ts>2016-07-21 14:58:04 +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>Functions and Operators 3.1</component>
          <version>Candidate Recommendation</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</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>editorial</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Tim Mills">tim</reporter>
          <assigned_to name="Michael Kay">mike</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>126357</commentid>
    <comment_count>0</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-06 09:27:23 +0000</bug_when>
    <thetext>Looking at the *:for-each functions, it would be nice if the applied function had a consistent name.

array:for-each(	$array	 as array(*),
$function	 as function(item()*) as item()*) as array(*)

map:for-each(	$input	 as map(*),
$action	 as function(xs:anyAtomicType, item()*)) as item()*

fn:for-each($seq as item()*, $f as function(item()) as item()*) as item()*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126359</commentid>
    <comment_count>1</comment_count>
    <who name="Tim Mills">tim</who>
    <bug_when>2016-05-06 09:32:05 +0000</bug_when>
    <thetext>It would also be nice if array:for-each and map:for-each had matching or consistent names for the first argument.

e.g. 

array:for-each(	$input	 as array(*),
$action as function(item()*) as item()*) as array(*)

map:for-each(	$input	 as map(*),
$action	 as function(xs:anyAtomicType, item()*)) as item()*

or

array:for-each(	$array as array(*),
$action as function(item()*) as item()*) as array(*)

map:for-each(	$map as map(*),
$action	 as function(xs:anyAtomicType, item()*)) as item()*</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>126678</commentid>
    <comment_count>2</comment_count>
    <who name="Michael Kay">mike</who>
    <bug_when>2016-06-06 15:21:03 +0000</bug_when>
    <thetext>I have changed map:keys(), map:size(), and map:for-each() to use $map as the name of the first argument.

I have changed map:for-each(), array:for-each(), fn:for-each(), and fn:for-each-pair() to use $action as the name of the function argument.

Note: I&apos;m not sure these changes at this stage are really a good idea. There is a grave danger of introducing unnecessary errors, and I&apos;m not at all convinced we should be encouraging readers to think of the argument names as being in any way significant.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>