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

[Bug 29263] if expression: optional else branch?

From: <bugzilla@jessica.w3.org>
Date: Thu, 05 Nov 2015 15:58:17 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29263-523-kE4cQ08U7d@http.www.w3.org/Bugs/Public/>
https://www.w3.org/Bugs/Public/show_bug.cgi?id=29263

Josh Spiegel <josh.spiegel@oracle.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |josh.spiegel@oracle.com

--- Comment #6 from Josh Spiegel <josh.spiegel@oracle.com> ---
I see this pattern sometimes:

  <root>{
      if ($var/foo) then
         <e>{$var/foo/data()}</e>
      else (),
      if ($var/bar) then
         <f>{$var/bar/data()}</f>
      else (),
      ...
  }</root>

I think it would be more readable without the "else()":

  <root>{
      if ($var/foo) then
         <e>{$var/foo/data()}</e>
      ,
      if ($var/bar) then
         <f>{$var/bar/data()}</f>
      ,
      ...
  }</root>

But this has failed to get through the working group at least twice.  Here is
one discussion I found:
https://lists.w3.org/Archives/Public/public-qt-comments/2004Jan/0378.html

And I remember pushing for it when scripting was still on the table.  In the
case of scripting there was another ambiguity where "else()" could be
interpreted as a function call.  But I don't think this is an issue without
scripting extensions.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
Received on Thursday, 5 November 2015 15:58:21 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 November 2015 15:58:21 UTC