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

Iteratee interfaces? #62

Open blake-regalia opened 3 years ago

blake-regalia commented 3 years ago

The callback parameters to some of the Dataset methods seem to be object interfaces that have named function members, test, map, and run. Was this a mistake, a limitation of WebIDL, or something else? To be clear, I believe the intent was to make these parameters function callbacks to align them with Array.prototype.* methods. https://github.com/rdfjs/types/pull/21

bergos commented 3 years ago

I wrote this aligned to the RDF Interfaces WebIDL. But I agree, it doesn't look right. I would be surprised if WebIDL doesn't cover this, so it's a mistake. We should find the correct WebIDL way of doing this and fix it.