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

Read-only Bindings interface #13

Open
Tpt opened this issue Jul 11, 2022 · 3 comments
Open

Read-only Bindings interface #13

Tpt opened this issue Jul 11, 2022 · 3 comments

Comments

@Tpt
Copy link

Tpt commented Jul 11, 2022

The Bindings interface is currently read-write. It might be convenient to provide also a smaller read-only interface for implementations which do not allow to change bindings like Oxigraph.

@l00mi
Copy link
Member

l00mi commented Jul 12, 2022

What is the advantage of having a specific read-only interface? What is the downside if the write operations throw an error if not implemented?

@tpluscode
Copy link

What is the advantage of having a specific read-only interface?

Principle of least surprise

If an interface is read-only, you will get design-time error. An exception is a runtime surprise waiting to happen.

I think I proposed something like that in the lengthy PR #7 discussions but could not quickly find that specific comment. IIRC, the argument was that a result stream is not only intended for end consumers but even more so to query processors and intermediaries which may modify the bindings.

/cc @rubensworks

@rubensworks
Copy link
Member

I'm definitely open to this. I guess this can easily be added in a non-breaking manner.
Feel free to suggest something via a PR.

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

No branches or pull requests

4 participants