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

DatasetCore#match returns Dataset or DatasetCore? #55

Open RubenVerborgh opened 5 years ago

RubenVerborgh commented 5 years ago

The DatasetCore interface description says it returns Dataset, but the description of match says This method always returns a new DatasetCore.

My suggestion would be to make it return a DatasetCore, and to make the equivalent method in Dataset return a Dataset.

retog commented 4 years ago

I think the same applies to the add and delete methods. The advantage of separating DatasetCore and Dataset is that DatasetCore can more easily be implemented and a decorator can be used tomake it a full-fledged Dataset, this advantage is lost if implementors of DatasetCore have to implement Dataset anyway to correctly implemenet the methods.