W3C home > Mailing lists > Public > public-rdfa-wg@w3.org > December 2010

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

From: Toby Inkster <tai@g5n.co.uk>
Date: Thu, 09 Dec 2010 14:56:15 +0000
To: Manu Sporny <msporny@digitalbazaar.com>
Cc: RDFa WG <public-rdfa-wg@w3.org>
Message-ID: <1291906575.20693.228.camel@ophelia2.g5n.co.uk>
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

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:19:50 UTC