rdfjs / dataset-spec

RDF/JS: Dataset specification 1.0 – This specification provides a definition how to store multiple quads in a so-called dataset.
https://rdf.js.org/dataset-spec/
6 stars 5 forks source link

Add .any() and .each() and .anyValue() #10

Open timbl opened 5 years ago

timbl commented 5 years ago

These functions in rdflib are the way I have done the bulk of the data to day working with RDF data.

Tim Berners-Lee @timbl 10:34 You don’t have each() and any() ??? This is supposed to be the thing which corresponds to the thing rdflyib.js used to call IndexedFormula and now calls Store?

@timbl scrolls back to "@timbl the idea is, like in the representation task force, to find a minimal interface we all agree on. additional custom methods can be added by datafactories, like rdflib. that's why there is no .any() or .each()."

Sorry I want every RDFJS implementation to be able to support my code. Having different implementations implement different methods is called lack of interop.

You can have two-level spec where the minimal interface is really the only methods whcih cannot be implemented in terms of other methods, and then the second level with the convenience functions is implemented everywhere and the spec people depend on.

My worry is that I have seen a lt of new developers writing everything in terms of match() and just concluding that RDF is a pain, when if they had used any() and each() then it would have been a simpler and more natural experience.

Discussed at https://gitter.im/rdfjs/public?at=5c069e8e43c68b3727fba1b9

ktk commented 5 years ago

Related to #8 and #4 .

We should keep the mandatory functions simple, dataset is still a low-level spec. Your functions would be in the "optional" group according to #4 IMHO.