RE: [XQuery] IfExpr should allow an optional else clause

Personal response: 

I think you would stand a better chance of getting this proposal through
the working group if

(a) you stated a justification as to why you think this change is
beneficial (don't assume that the benefits are obvious)

(b) you made a proposal as to how the language should deal with the
resulting "dangling else" ambiguity.

(For my own part, I would have much prefered a syntax in which
expressions were self-closing, e.g. 

if (Expr) then Expr [else Expr] fi

But I lost that battle. I don't think it would be a good idea to make
"else" optional unless we introduce a mandatory closer to remove the
ambiguity.)

Michael Kay


> -----Original Message-----
> From: public-qt-comments-request@w3.org 
> [mailto:public-qt-comments-request@w3.org] On Behalf Of TAN Kuan Hui
> Sent: 27 January 2004 01:16
> To: public-qt-comments@w3.org
> Subject: [XQuery] IfExpr should allow an optional else clause
> 
> 
> 
> Kindly reconsider to amend production [54] to allow for an 
> optional else clause.
> 
> [54]   IfExpr   ::=   <"if" "("> Expr ")" "then" ExprSingle ("else"
> ExprSingle)?
> 
> with nested if-then-else tied through parentheses as
> suggested below 
> http://lists.w3.org/Archives/Public/www-> ql/2004JanMar/0017.html
> 
> 

Received on Tuesday, 27 January 2004 19:43:58 UTC