Christian,
I really hope you will change your mind about this. In BaseX, as a function development environment, all structural constructs such as: “if then else” should be available as functions. Personally: as a functiondevelopmentjunky, I took a lot of effort replacing all ifThenElse-constructs into util:if-functions. I really would be disappointed if structural constructs aren’t available as functions in BaseX.
Hope you’ll change your mind about this point.
Regards, Rob Stapper
Message: 4 Date: Tue, 21 Nov 2023 16:45:31 +0100 From: Christian Gr?n christian.gruen@gmail.com To: Andy Bunce bunce.andy@gmail.com Cc: BaseX basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] BaseX 10.7 and util:if Message-ID: CAP94bnMjeeXxsFBYVYjTJvJcSbGkzbxOnR99xNkpCv_oQ9GRWg@mail.gmail.com Content-Type: text/plain; charset="utf-8"
?thanks for the pointer. I?ve revised the documentation.
One property of util:if was that you could omit the argument for the else branch. We decided to drop util:if, because the specification now provides a new syntax for if expressions where the else branch is optional:
if ($test) { $then } if ($test) { $then } else { $else }
The ternary operator was temporarily added to the spec as an official feature, but we eventually dropped it again to reduce the number of different notations for existing features (unfortunately, the popular A ? B : C syntax was no option, as ? is already used for lookups).
Sent from Mail for Windows
From: basex-talk-request@mailman.uni-konstanz.de Sent: Wednesday, November 22, 2023 12:00 PM To: basex-talk@mailman.uni-konstanz.de Subject: BaseX-Talk Digest, Vol 167, Issue 7