[Bug 25445] New: [XP3.1] Replace curly array constructor with a function


            Bug ID: 25445
           Summary: [XP3.1] Replace curly array constructor with a
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath 3.1
          Assignee: jonathan.robie@gmail.com
          Reporter: mike@saxonica.com
        QA Contact: public-qt-comments@w3.org

Semantically, array { X } is a pure function of X. I can't see any good reason
why it needs special syntax; it should be a function call.

We have used curly brace syntax traditionally for things that are too complex
to express as functions. This one isn't. It converts a sequence to an array;
the inverse operation, to convert an array to a sequence, is a function.

There is no other case where we have used curly braces for something that is a
simple non-higher-order function.

With the syntax growing it's becoming increasingly difficult to remember where
to use curlies and where to use parens. For things like typeswitch I have to
look it up every time. So let's avoid new syntax where we don't need it, and
lets avoid making the two parallel operations array() and seq() different.

Plus, using functions in a functional language has obvious benefits.

You are receiving this mail because:
You are the QA Contact for the bug.

Received on Thursday, 24 April 2014 22:03:17 UTC