QT4 CG Meeting 190 Minutes 2026-11-24

Meeting index / QT4CG.org / Dashboard / GH Issues / GH Pull Requests

Table of Contents

Summary of new and continuing actions [0/7]

  • [ ] QT4CG-143-02: MK to try to recover the ability to extract formal equivalences into tests
  • [ ] QT4CG-167-07: NW to review tests for interpolated strings with edge cases in mind
  • [ ] QT4CG-170-01: RD to draft a proposal that attempts to address the lexical issues differently.
  • [ ] QT4CG-177-01: NW to put the progress graphs back in the minutes.
  • [ ] QT4CG-182-01: NW to review CG’s diff script
  • [ ] QT4CG-187-01: MK to elaborate on the proposal in PR #3031
  • [ ] QT4CG-189-01: NW to coordinate Adam joining next week.

Draft Minutes

1. Administrivia

1.1. Roll call [6/11]

Regrets: DB, BTW, JK, JLO.

  • [ ] David J Birnbaum (DB)
  • [X] Reece Dunn (RD)
  • [X] Christian Grün (CG)
  • [ ] Joel Kalvesmaki (JK)
  • [X] Michael Kay (MK)
  • [ ] Juri Leino (JLO)
  • [X] John Lumley (JWL)
  • [X] Alan Painter (AP)
  • [ ] Wendell Piez (WP)
  • [ ] Bethan Tovey-Walsh (BTW)
  • [X] Norm Tovey-Walsh (NW), Scribe, Chair.

1.2. Accept the agenda

Proposal: Accept the agenda.

Amended per email from CG.

Accepted.

1.3. Approve minutes of the previous meeting

Proposal: Accept the minutes of the previous meeting.

Accepted.

1.4. Next meeting

The next meeting is planned for 1 December.

Regrets from JWL.

1.5. Review of open action items [0/7]

  • [ ] QT4CG-143-02: MK to try to recover the ability to extract formal equivalences into tests
  • [ ] QT4CG-167-07: NW to review tests for interpolated strings with edge cases in mind
  • [ ] QT4CG-170-01: RD to draft a proposal that attempts to address the lexical issues differently.
  • [ ] QT4CG-177-01: NW to put the progress graphs back in the minutes.
  • [ ] QT4CG-182-01: NW to review CG’s diff script
  • [ ] QT4CG-187-01: MK to elaborate on the proposal in PR #3031
  • [ ] QT4CG-189-01: NW to coordinate Adam joining next week.
    • Pending: I sent email but haven’t had a reply

CG reports that Adam is likely available next week.

1.6. Review of open pull requests and issues

This section summarizes all of the issues and pull requests that need to be resolved before we can finish. See Technical Agenda below for the focus of this meeting.

1.6.1. Merge without discussion

The following PRs are editorial, small, or otherwise appeared to be uncontroversial when the agenda was prepared. The chairs propose that these can be merged without discussion. If you think discussion is necessary, please say so.

  • PR #3097: 3095 MethodCall: no placeholders in grammar
  • PR #3093: 3092 Optional types for options with default ()
  • PR #3091: 3082 function-name() of partial applications
  • PR #3090: 2846 write, append: defaults, notes
  • PR #3089: 3045 fn:serialize: defaults for omitted argument
  • PR #3073: 3072 Switch, typeswitch: optional default clause
  • PR #3063: 3062 fn:resolve-uri: non-hierarchical bases
  • PR #3058: 3057 Casting to records: use target %fixed values
  • PR #3056: 3053 Guarded expressions: runtime type errors

Proposal: merge without discussion.

Accepted.

2. Technical agenda

2.1. PR #3065: 3064 fn:jvalue: accept any item

See PR #3065

  • CG: This is about the jvalue function. When you use the data() function works on all input. But jvalue only works for JNodes. The idea is to make jvalue() just return the value unchanged if it isn’t a JNode
  • MK: I like the convergence with the data() function. I’m almost inclined to call it jdata() instead of jvalue()
    • … The data() function is one of the few that maps over a sequence.
  • RD: On that note, given the similarity, is there a reason not just merge the functionality into data()?
  • CG: The semantics are slightly different for coercion and mapping.
  • MK: If the JNode maps an array, the array doesn’t get atomized.
  • JWL: If jvalue() works over a sequence, do we have a problem where the jnode() value is a sequence, you’d get sequence concatentation in the result. Is that going to be a problem?
  • MK: If you give data() a sequence, it flattens it. You can be explicit if you want something else.
  • CG: We could have jvalue() as is and add a jdata() that takes arbitrary sequences.
  • MK: I don’t think it’s really needed.

Proposal: Accept this PR.

Accepted.

2.2. PR #3071: 3070 Guarded expressions: missing constructs

See PR #3071

  • CG: There is a list of guarded expressions that define which must be evaluated instead of raising an error.
    • … I thought we should extend this list to predict truth values.
    • … And in lookup expressions where the left hand side is an empty sequence.
    • … And for nested quantifiers.
  • RD: Do the guarded expressions constitute a breaking change from 3.1 to 4.0? Is that documented?
  • CG: My impression was that it’s mostly specified more strictly.
  • MK: It allows users to assume something they could assume before, so it widens the language rather than narrowing it.
  • RD: In the case where you have the filter on an empty sequence, if an implementation decides to raise a dynamic error, that’s valid under 3.1. But not under 4.0.
  • NW: I think changes that make an error into something that isn’t an error aren’t generally considered backwards incompatible.
  • MK: In the case where the expression in square brackets doesn’t depend on the context, it’s common to loop-lift it.
    • … I don’t think we should make that an error. If attempting to evaluate it as an integer raises an error, that should still be ok to make an error.
    • … But this PR says predicate truth value not predicate integer value but I’m not sure if that’s intentional.

Some discussion of how predicate truth values work.

  • MK: We probably do need some elaboration of this clause for when P evaluates to something numeric.
    • … But I’m not sure the new paragraph ends anything.

CG will clarify and we’ll revisit.

2.3. PR #3075: 3074 Regular expressions: Unicode scripts

See PR #3075

  • CG: Many regex engines provide a feature to look for characters that are written in a specific script.
    • … \p{Script=Greek} differs from \p{IsGreek}.
    • … There’s also a Script_Extensions feature that’s also supported by some implementations.
    • … I was hesitant, but it seems to be a mapping that’s not too hard to add.
  • RD: Scripts are defined in the Unicode character data script file, how are script extension defined?
  • CG: They are also a property in the propety name file.
  • MK: Do we need two syntaxes for it? (Script and sc and Script_Extensions and scx)
  • CG: I’d have to look up which is more common in other languages.
  • RD: Given that the script extensions is in the property names, do we support matching other property names like whitespace?
  • MK: You can match against character classes which account for a lot of the properties.
  • RD: In properties you have things like punctuation type.
  • MK: You can’t match “is this an opening bracket”.

CG will drop the short names.

Proposal: Accept this PR with that ammendment.

Accepted.

CG will make the change and then merge the PR.

  • RD: The short names are also in Unicode.

(That doesn’t change the group’s opinion.)

2.4. PR #3076: 2935A: Default function options in the static context

See PR #3076

  • MK: Leave this until I’ve done my action to revise it.

2.5. PR #3081: 2935B Arithmetic Mode Decimal

See PR #3081

  • MK: This was requested by a user in a very detailed description motivated by the requirement in EU accounting standards to use decimal arithmetic.
  • MK: It changes a few functions and XQuery and XSLT to set options in the static context.
  • MK: Arithmetic mode decimal is added to the static context.
  • MK: You can specify “decimal” or “double” which is what we do now.
  • MK: Coercion is sensitive to the arithmetic mode in the static context.
    • … The expression providing the value determines which static context that’s relevant.
    • … There’s a special case for xs:numeric in union types.
  • MK: In the section on arithmetic, we call out the preferred numeric type.
  • MK: declare option arithmetic-mode "decimal;" is added to the XQuery options.
  • MK: This is an optional feature; it’s not something that every user or every implementor might need.
  • MK: For XSLT, it’s just about setting options.
    • … There’s a new standard [xsl:]arithmetic-mode attribute.
    • … There’s a new system property that tells you what the arithmetic mode is.
  • MK: In Functions and Operators
    • … Many functions, like fn:avg(), become context sensitive to the arithmetic type in the static context
    • … And it gets added to system properties
  • JWL: Part of the motivation was accountancy rounding modes. We had a whole table of half a dozen of those.
  • MK: This one doesn’t tackle rounding. This is separable from rounding.
  • AP: Won’t this require some additional profiling to determine if I’ve done the right thing in all my static contexts?
    • … In spots, I’d need to insert some checks or something. Isn’t that an additional burden on the users?
  • MK: There’s some additional complexity, but if you need it it’s manageable.
  • CG: The original feature request proposed to return decimal for fn:number, maybe it would be more consistent to go one step further and adjust some functions too.
    • … At least for me, it’s common that the data() and number() function do the same thing.
  • MK: I resisted that because number() is from 1.0 and you can use the xs:numeric constructor to cast to numeric. That will do the right thing because it’s casting to xs:numeric.
    • … I didn’t think we needed to change number, but I’m not averse to it.
  • CG: My feedback is implementation driven; we have many cases in the code where if atomization will occur, we rewrite it to use the number function. From our perspective it would be more consistent to do it everywhere the same.
    • … Basically, I think it’s a nice step forward and I remember other cases where double was problematic.
  • MK: The other place I’ve deviated from the user’s proposal is INF and NAN. I’ve made that an error in those special cases.
  • JWL: AP’s point about debugging in situations where the static context can vary all over the shop, is there a case for a function that tells you (as a map) what the static context contains?
  • MK: We have a lot of little functions that do parts of that.
  • JWL: Yes, but what about the general case.

Some discussion of the complexity. Do you want to know all the statically declared variables?

  • RD: Having access to things like the declared variables and values would be useful for implementing debugging in IDEs.
  • MK: Yes, but it’s also a nightmare for optimizers.

Proposal: Accept this PR.

Accepted.

MK to sort out the base of the PR and then merge it.

2.6. PR #3086: 3052 fn:update: refinement of actions

See PR #3086

  • CG: I’ll focus on the changes in this PR.
    • … I’ve added an explicit delete action.
    • … I’ve renamed some things: replace-value, insert-before, and insert-after.
    • … I’ve restructured the presentation of the function; now most of the contents are part of the introduction.
    • … I’ve attempted to summarize the processing model.
    • … As a result the function section is much shorter.
  • CG: All of this is editorial.

Proposal: Accept this PR.

Accepted.

2.7. PR #3087: 3051 fn:type-of: records

See PR #3087

  • CG: Another simple one.
  • CG: It changes the output of type-of for records.
    • … Instead of record(T), just return T. I think this would be more consistent.
  • MK: I have slight reservations because it makes it harder to discover that the thing is a record. But you can always use instance of.

Proposal: Accept this PR.

Accepted.

2.8. PR #3088: 3085 Editorial rewrite of function equivalence

See PR #3088

MK reviews the PR.

  • MK: This has been through a couple of iterations.
    • … It defines equivalent in terms of indistinguishable results.
    • … We introduce recognizably equivalent which fn:deep-equal uses.
    • … You can use your own algorithm, but there’s a minimum that you must recognize.
      • … Originating form and capture context
    • … And then there are lots of examples.

Proposal: Accept this PR, with a few edge cases as noted by MK.

Accepted.

3. Any other business

None heard.