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

Proposed extensions to unary and binary lookup expressions #3

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

michaelhkay
Copy link
Member

Allows certain common constructs (string literals and variable
references) to appear on the RHS of the lookup operator "?" without
parentheses

Allows certain common constructs (string literals and variable
references) to appear on the RHS of the lookup operator "?" without
parentheses
@ChristianGruen
Copy link
Member

A clear +1 from my side!

We noticed as well that it can be painful to explain the difference between $array?($i) and $array($i) even to advanced XQuery users. Code will be better readable if there will be more cases in which the parentheses can be avoided.

@adamretter
Copy link
Member

+1 from me too.

Looks good.

Unless I see any objections within a month, I think we can safely merge this. People can always file issues later, after all, these are only proposals at this stage.

@rhdunn Any comments?

@rhdunn
Copy link

rhdunn commented Oct 21, 2018

+1 from me as well

No comments at this stage.

@rhdunn
Copy link

rhdunn commented Oct 29, 2018

Should this also add QName and URIQualifiedName to the list of unparenthesized items? This way, NCName can be replaced by EQName. This would allow:

$map?point:x
$map?Q{}x

@michaelhkay
Copy link
Member Author

The main purpose of the lookup construct is for easy addressing into JSON structures, and QName-valued keys don't arise in JSON, so I think not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants