33 messages in com.x-query.talkRe: [xquery-talk] XQuery Style Conven...| From | Sent On | Attachments |
|---|---|---|
| McBeath, Darin W (ELS-AMS) | 20 Oct 2005 12:30 | |
| Raffaele Sena | 20 Oct 2005 16:00 | |
| Michael Rys | 20 Oct 2005 18:35 | |
| Michael Kay | 21 Oct 2005 01:42 | |
| Martin Probst | 21 Oct 2005 02:17 | |
| Martin Probst | 21 Oct 2005 03:00 | |
| McBeath, Darin W (ELS-AMS) | 21 Oct 2005 06:53 | |
| Joel Stewart | 21 Oct 2005 07:03 | |
| McBeath, Darin W (ELS-AMS) | 21 Oct 2005 11:03 | |
| Michael Kay | 21 Oct 2005 12:45 | |
| David Sewell | 22 Oct 2005 09:35 | |
| Michael Kay | 22 Oct 2005 10:47 | |
| Michael Kay | 22 Oct 2005 13:09 | |
| Liam Quin | 22 Oct 2005 18:06 | |
| David Sewell | 22 Oct 2005 20:31 | |
| Martin Probst | 24 Oct 2005 01:09 | |
| Frank Cohen | 24 Oct 2005 07:33 | |
| Frank Cohen | 24 Oct 2005 07:35 | |
| Ronald Bourret | 24 Oct 2005 10:05 | |
| Michael Kay | 24 Oct 2005 15:28 | |
| McBeath, Darin W (ELS-AMS) | 26 Oct 2005 06:48 | |
| Michael Dyck | 26 Oct 2005 11:52 | |
| Till Westmann | 27 Oct 2005 23:11 | |
| Martin Probst | 28 Oct 2005 02:21 | |
| Michael Rys | 28 Oct 2005 09:34 | |
| Till Westmann | 28 Oct 2005 22:22 | |
| Till Westmann | 28 Oct 2005 22:24 | |
| Per Bothner | 29 Oct 2005 00:54 | |
| Michael Kay | 29 Oct 2005 01:29 | |
| Till Westmann | 29 Oct 2005 15:30 | |
| David Sewell | 16 Nov 2005 09:22 | |
| Michael Kay | 16 Nov 2005 10:37 | |
| Michael Kay | 17 Nov 2005 04:43 |
| Subject: | Re: [xquery-talk] XQuery Style Conventions![]() |
|---|---|
| From: | Till Westmann (till...@bea.com) |
| Date: | 10/28/2005 10:22:52 PM |
| List: | com.x-query.talk |
On Oct 28, 2005, at 2:21 AM, Martin Probst wrote:
Personally, I prefer to keep them all at the same level to keep the query compact (and it also fits well with the grammar).
Well, if you have queries going over hundreds of lines with >10 different for/let clauses, it is actually very helpful to get at least a guess at which level of loop nesting you are. Otherwise you just have a long sequence of statements on the same indentation level, so the indentation doesn't give you any information.
As a FLWOR expression can have any number of for and let clauses but only one of each of the other clauses, all the expressions that are evaluated based on the variable bindings of the for and let clauses are evaluated at the same level. That level is given by the number of for clauses in the FLWOR. (Whenever there is a nested FLWOR in a where or return clause there should obviously be some form of indentation.) So the trade-off is between counting for clauses and wasting columns. I think that saving columns is worth counting for clauses.
Best regards, Till




