Re: New RDF API and RDFa API Editor's Drafts

On Thu, 2010-12-09 at 00:59 -0500, Manu Sporny wrote:
> The RDF API
> http://www.w3.org/2010/02/rdfa/sources/rdf-api/
> 
> The RDFa API
> http://www.w3.org/2010/02/rdfa/sources/rdfa-api/ 

A few comments:

Firstly, what's the point of the callback parameter to
DataParser.parse(). It seems pretty useless, but it's not optional. If I
want "foo" to happen to the graph after parsing is complete, it's
encouraging me to use:

 turtle.parse(doc, function(g) {
  foo(g);
 });

whereas it seems far more simple and natural to do this:

 turtle.parse(doc, null, null, null, g);
 foo(g);

Anticipating an answer of "parallel processing", I'll counter with "look
at the return value of parse()"! If parse() has to wait to return a
success indicator, it can't be processed in parallel with the following
code.

Unless there's some incredibly good reason to use a callback here that
I'm missing, please don't. It just confuses people and will complicate
implementation in programming languages that don't treat functions as a
first class.

Given that (at least in the way it's currently defined) it's pretty
esoteric it should be made optional, and placed *after* the other more
useful parameters like base, filter and graph in the method's argument
list.

Secondly, PropertyGroups (which are still an awful name by the way, or
are they now Projections?) seem to make a lot more sense as part of the
RDF API.

-- 
Toby A Inkster
<mailto:mail@tobyinkster.co.uk>
<http://tobyinkster.co.uk>

Received on Thursday, 9 December 2010 14:57:00 UTC