这是indexloc提供的服务,不要输入任何密码
Skip to content

SEP-0006 issue that may be very confusing for users #194

@VladimirAlexiev

Description

@VladimirAlexiev

@afs @JervenBolleman

https://github.com/w3c/sparql-dev/blob/main/SEP/SEP-0006/sep-0006.md#scope

A sub-select may have variables of the same name that are not lateral-joined to a variable of that name from the LHS.
The inner ?s in the SELECT ?label is not the outer ?s, because the SELECT ?label does not pass out ?s.

This is very confusing for me because here's how I think:

  • the RHS is a "subroutine" that's executed in a loop
  • Its inputs are the variables bound in the LHS
  • Its outputs are the variables projected out in SELECT

So it's confusing for me that to use a var as an input, I need to mention it in the "output" clause.
This comment by @frensjan #100 (comment) is in a similar vein.

I understand that by SPARQL algebra, it's not possible to equate the inner-but-not-exported ?s to the outer ?s.
However, is it possible to return an error or warning, because it's virtually certain that the user didn't mean to use the same var name for two different variables? SEP-0006 goes on:

There needs to be a new syntax restriction: there can be no variable ...

So I'm asking: can a similar syntax restriction be enforced for the case in question?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions