-
Notifications
You must be signed in to change notification settings - Fork 18
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
1798 Function fn:function-identity #1801
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"can be assigned permanent identities in the official documentation, requiring every implementation to use exactly the published identity value for the official, system functions, thus achieving efficiency, uniformity, and a degree of interoperability. - this is the official documentation, so it's inappropriate to include such a statement here. (I suggest saying that for these functions the result of function-identity is the URI-qualified name followed by '#' and the arity.)
I am deleting this text now. Defining the exact values for the function identity of the system functions is probably better done separately, and could be discussed. |
The Data Model spec, where it introduces function identity, needs to be updated (because it currently implies that function identity cannot be exposed in this kind of way). The Data Model spec also states that "Function identity is not currently defined for maps and arrays", which leaves an open question as to what the proposed |
Yes, it only says that the function identity is "abstract" It probably would be best to update the DM in a separate PR.
This negative statement simply needs to be removed from the documentation. If the generated identity value is "abstract", then it can be generated the same "abstract" way as done for (non-array and non-map) functions. We probably should not prescribe what values are generated for non-system functions, we only need a bijective projection of whatever they use internally, into xs:string. Of course, if I am an implementor, I will probably use GUIDs, but some other implementors may prefer to use something entirely different. |
The material question for maps and arrays is whether there are any circumstances in which two expressions that return maps or arrays are guaranteed to return the same map or array. For example, we might want to specify that all evaluations of Another significant question is whether function identity is affected by the presence of labels. This applies particularly strongly to maps and arrays: does |
It would be good to avoid proving function identity. In some simple/regular cases this can be done, but not in every case. The ways identity is generated (by the implementation) is orthogonal to this issue - which is the specification of just the function that returns this identity-value to the caller. This said, and talking beyond the subject of this PR, one obvious way of assigning identity to maps and arrays is producing the hash of their normalized serialization. But again, why not leave this to the specific implementations?
Again, beyond of the coverage of this PR: |
Fix #1798 |
And isn't this cryptic? Sorry, what does this mean? MHK> It's a magic incantation understood by GitHub to mean that when this PR is merged, issue 1798 can be automatically closed. |
…n-function_identity Integration.
…n-function_identity Integration
At meeting 112, the CG agreed to merge this PR. |
The function fn:identity as already described and discussed in #1798