|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] RE: How is satisfies different from where ?Michael Rys mrys at microsoft.comMon May 24 06:14:50 PDT 2010
Hallo Hans-Juergen Yes, the transformation into a for clause is more opaque and clumsy. Viele Gruesse Michael -----Original Message----- From: Hans-Juergen Rennau [mailto:http://x-query.com/mailman/listinfo/talk] Sent: Sunday, May 23, 2010 1:47 AM To: Michael Rys Cc: http://x-query.com/mailman/listinfo/talk; http://x-query.com/mailman/listinfo/talk Subject: AW: RE: How is satisfies different from where ? Hello Michael, that is very interesting, thank you! Only one question I still have. You wrote: "In addition, some ... satisfies ... allows us to write more complex expressions with multiple bindings in a more precise style than using for-where." Certainly, a "some" expression has a more explicit syntax. But what do you mean with "more precise style", could you give an example? Is it not so that every "some" expression can be deterministically transformed into an equivalent for-where expression, the return clause of which can use any one of the bound variables, for example, always the first? (As the existence of the tuple is equivalent to the existence of all bound variables.) Certainly, this is a rather opaque style of of expressing one's intent, and perhaps it is that what you mean when comparing the "precision of style", but I am not sure. With kind regards, Hans-Juergen ----- Ursprüngliche Mail ---- Von: Michael Rys <http://x-query.com/mailman/listinfo/talk> An: Hans-Juergen Rennau <http://x-query.com/mailman/listinfo/talk>; "http://x-query.com/mailman/listinfo/talk" <http://x-query.com/mailman/listinfo/talk> CC: "http://x-query.com/mailman/listinfo/talk" <http://x-query.com/mailman/listinfo/talk> Gesendet: Sonntag, den 23. Mai 2010, 5:17:01 Uhr Betreff: RE: RE: How is satisfies different from where ? One of the reasons why we have some... satisfies... is the following reasoning: 1. All the predicates in XQuery and XPath are by default and implicitly existentially quantified. 2. In order to provide universal quantification, we needed to add an explicit expression that was giving us the desired semantics. We did some discussions, would an aggregator suffice (e.g., all(X) returning true if all x in X are true) or do we want an expression. We ended up with every ... satisfies.... 3. In good language design, it is always good to have explicit syntax for implicit semantics too. So we decided to also add some .... satisfies .... 4. In addition, some ... satisfies ... allows us to write more complex expressions with multiple bindings in a more precise style than using for-where. Best regards Michael
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






