rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Signature of all things which take S, P O, G should be consistent

Open timbl opened this issue 5 years ago • 1 comments

At the moment you can write

     store.add(me, ns.foaf('age'), 6, me.doc())

where the 6 is converted automatically to a literal but you can't do

     let st = store.st(me, ns.foaf('age'), 6, me.doc())
     store.add(st)

as the new statement code doesn't do the same liberal type coercion. In an ideal world, developers should know that they can use the same shortcuts (like string, Date, number, etc) with any function or method which takes subject, predicate, object, graph or for that matter subject, predicate, object .

This probably means bother using common functions to convert and using the same names of types.

This includes st, add, match, and probably others.

timbl avatar May 05 '20 13:05 timbl

Would also fix https://github.com/linkeddata/rdflib.js/issues/416

megoth avatar May 05 '20 14:05 megoth