BaseX 10.7 and util:if (Christian Gr?n)

Wednesday, 22 November 2023 · 2 messages
RS
Rob Stapper22 Nov 2023 13:07 #
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
Quoted text · Christian Gr?n · 25 lines
From: Christian Gr?n <christian.gruen at gmail.com> To: Andy Bunce <bunce.andy at gmail.com> Cc: BaseX <basex-talk at mailman.uni-konstanz.de> Subject: Re: [basex-talk] BaseX 10.7 and util:if Message-ID: <CAP94bnMjeeXxsFBYVYjTJvJcSbGkzbxOnR99xNkpCv_oQ9GRWg at 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 at mailman.uni-konstanz.de Sent: Wednesday, November 22, 2023 12:00 PM To: basex-talk at mailman.uni-konstanz.de Subject: BaseX-Talk Digest, Vol 167, Issue 7 -- This email has been checked for viruses by Avast antivirus software. www.avast.com
CG
Christian Grün22 Nov 2023 13:49 #
…thanks, Rob, thanks Andy, for the inquiry. I think we can re-add the function, it shouldn’t cause problems. I learned over time that the best (and sometimes only) way to find out which features are used is to simply remove them…
Quoted text · Rob Stapper · 98 lines
On Wed, Nov 22, 2023 at 1:07 PM Rob Stapper <r.stapper at lijbrandt.nl> wrote: > 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 at gmail.com> > > To: Andy Bunce <bunce.andy at gmail.com> > > Cc: BaseX <basex-talk at mailman.uni-konstanz.de> > > Subject: Re: [basex-talk] BaseX 10.7 and util:if > > Message-ID: > > < > CAP94bnMjeeXxsFBYVYjTJvJcSbGkzbxOnR99xNkpCv_oQ9GRWg at 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 <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows > > > > *From: *basex-talk-request at mailman.uni-konstanz.de > *Sent: *Wednesday, November 22, 2023 12:00 PM > *To: *basex-talk at mailman.uni-konstanz.de > *Subject: *BaseX-Talk Digest, Vol 167, Issue 7 > > > > > > > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > Virus-free.www.avast.com > <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient> > <#m_592359606519990792_DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> >

⚡Generated with XQuery