W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2016

[Bug 29982] New: [XSLT30] What is this Note, comparing tunnel params with variables in functional languages referring to?

From: <bugzilla@jessica.w3.org>
Date: Sun, 06 Nov 2016 07:37:36 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29982-523@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29982

            Bug ID: 29982
           Summary: [XSLT30] What is this Note, comparing tunnel params
                    with variables in functional languages referring to?
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: minor
          Priority: P2
         Component: XSLT 3.0
          Assignee: mike@saxonica.com
          Reporter: abel.braaksma@xs4all.nl
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

We write, under the definition of Tunnel Parameters (section 10.1.3):

"Tunnel parameters are conceptually similar to dynamically scoped variables in
some functional programming languages."

I am not sure what this refers to. I use functional languages, though, while
not claiming to be intimately familiar to all of them, I have not encountered
this (unless I am confused by the terminology).

However, what *is* very common in all functional languages (except XPath) is
currying:

let f a b = a + b   // function takes two arguments and adds them
let g a = f a 12    // create "tunnel" param for a, and fix b to 12
let h = f 42        // other way of creating "tunnel" param, and fix a to 42

Both functions g an f have an argument fixed, one for 12 and one for 42. The
parameter a in g a is now tunneled through to f, and in h, which is seemingly
without parameter, this is implicitly done.

I think that tunneled parameters in XSLT are closest to currying, even though
they are distinct techniques.

Perhaps the Note in this section is supposed to mean currying with "dynamically
scoped variables", but I am not sure. Perhaps the safest thing is to drop it, I
find it confusing..., or to be more precise about what we refer to.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Sunday, 6 November 2016 07:37:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:58:03 UTC