You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At one of our last meetings we decided against static variables. The argument was that you could simply use static options for this.
This leads to non-intuitive code. I often create variables/names for magic values in pipelines and/or libraries. The only way to do this now is to add static options. But they're not options... I have no intention to ever change them from the outside. Even stronger: I want them definitely to be absolutely immutable! Doing this by adding static options feels like a (dirty) trick. So from a software-engineering point of view I don't think this was a good decision.
There are of course several ways we can solve this:
Re-instate static variables. You can even do this as (almost) "syntactic sugar": it will be "just" a static option, with the only difference you can't set it.
Add <p:constant name="..." as="..." select="..."/>. Very clear what is meant. But: maybe not a good idea, because there is no such thing as a "constant" in XSLT/XPath. Variables are already constant. XQuery however has something resembling constants (variables in the prolog).
The text was updated successfully, but these errors were encountered:
At one of our last meetings we decided against static variables. The argument was that you could simply use static options for this.
This leads to non-intuitive code. I often create variables/names for magic values in pipelines and/or libraries. The only way to do this now is to add static options. But they're not options... I have no intention to ever change them from the outside. Even stronger: I want them definitely to be absolutely immutable! Doing this by adding static options feels like a (dirty) trick. So from a software-engineering point of view I don't think this was a good decision.
There are of course several ways we can solve this:
<p:constant name="..." as="..." select="..."/>
. Very clear what is meant. But: maybe not a good idea, because there is no such thing as a "constant" in XSLT/XPath. Variables are already constant. XQuery however has something resembling constants (variables in the prolog).The text was updated successfully, but these errors were encountered: