Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In XQuery, allow a semicolon at the end of the module #175

Closed
michaelhkay opened this issue Oct 3, 2022 · 7 comments
Closed

In XQuery, allow a semicolon at the end of the module #175

michaelhkay opened this issue Oct 3, 2022 · 7 comments
Labels
Abandoned PR was rejected, withdrawn, or superseded Enhancement A change or improvement to an existing feature XQuery An issue related to XQuery

Comments

@michaelhkay
Copy link
Contributor

A trivial little enhancement to remove an irritant: allow a semicolon after the query body in a query. Specifically, change

QueryBody ::= Expr

to

QueryBody ::= Expr Separator?

@michaelhkay michaelhkay added XQuery An issue related to XQuery Enhancement A change or improvement to an existing feature labels Oct 3, 2022
@ndw
Copy link
Contributor

ndw commented Oct 3, 2022

In my days writing XQuery, I would often come across modules written as

some XQuery ; some more XQuery ; yet more XQuery

I almost never did it, and I don't recall exactly what it meant. I think the ; formed a transaction boundary. But maybe that was a MarkLogicism.

Is using semicolons that way valid according to the XQuery 4.0 syntax, and if it is, does this proposal change it at all?

@ChristianGruen
Copy link
Contributor

ChristianGruen commented Oct 3, 2022

I would tend to be strict. Semicolons are illegal in many other languages, too, and it seems arbitrary to me to allow them in XQuery. We should then allow trailing commas, too, and possibly other characters (?).

@ndw IIRC, the semicolon was a valid character in the XQuery Scripting Extension, with John Snelson being one of the editors. Maybe MarkLogic was inspired by it (or the other way round)?

@ndw
Copy link
Contributor

ndw commented Oct 3, 2022

Could be. Thank you, @ChristianGruen. On casual inspection of the grammar, it certainly looked like an extension. Thanks for the confirmation.

@michaelhkay
Copy link
Contributor Author

Yes, semicolon was used as a separator or terminator (I forget which) in XQuery Scripting proposals.

Languages differ greatly in how strict they are about semicolons. In Java I rely heavily on the IDE to tell me when I've got it wrong, because the rules have become very arbitrary.

@dnovatchev
Copy link
Contributor

A trivial little enhancement to remove an irritant: allow a semicolon after the query body in a query. Specifically, change

QueryBody ::= Expr

to

QueryBody ::= Expr Separator?

Hope you mean XQuery and nor XPath? :)

@ChristianGruen ChristianGruen added the Propose Closing with No Action The WG should consider closing this issue with no action label Jun 20, 2023
@ChristianGruen
Copy link
Contributor

I think we shouldnt’ introduce optional semicolons. I’ve assigned »Propose Closing with No Action« (everyone: please object).

@ndw
Copy link
Contributor

ndw commented Jun 27, 2023

The CG agreed to close this issue without action at meeting 040.

@ndw ndw closed this as completed Jun 27, 2023
@michaelhkay michaelhkay added Abandoned PR was rejected, withdrawn, or superseded and removed Propose Closing with No Action The WG should consider closing this issue with no action labels Apr 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Abandoned PR was rejected, withdrawn, or superseded Enhancement A change or improvement to an existing feature XQuery An issue related to XQuery
Projects
None yet
Development

No branches or pull requests

4 participants