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

Export Quad Component Types #5

Open
blake-regalia opened this issue Nov 10, 2020 · 0 comments
Open

Export Quad Component Types #5

blake-regalia opened this issue Nov 10, 2020 · 0 comments

Comments

@blake-regalia
Copy link
Contributor

I'd like to propose adding simple union types for the various quad components. Generally, I am all for adding these types of semantic shortcuts that provide utility to implementations since there really is no overhead to consider. Of course though, the naming and organization of such additions is paramount.

// for 'hard' RDF 1.1 data; which excludes Quads and Variables 
export namespace Role {  // idk, it's shorter than 'Component'
   export type Subject = NamedNode | BlankNode;
   export type Predicate = NamedNode;
   export type Object = NamedNode | BlankNode | Literal;
   export type Graph = DefaultGraph | NamedNode | BlankNode;
   export type Datatype = NamedNode;
}

There could be another namespace for RDF-star, although it still seems quite uncertain to me at this point whether it will survive the standards track. IMO, Variables can be union'ed in on user-side for each of these component types.

I would also like to see Quad_Subject and the like put into a namespace, but I'm sure others had reasons for not doing that initially so I'd like to hear from them.

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 a pull request may close this issue.

1 participant