W3C home > Mailing lists > Public > public-swd-wg@w3.org > September 2007

Re: Why I don't like 'instanceof' (was Re: [RDFa] ISSUE-3: syntactic sugar for rdf:type)

From: Steven Pemberton <steven.pemberton@cwi.nl>
Date: Wed, 05 Sep 2007 14:01:50 +0200
To: mark.birbeck@x-port.net, "Ivan Herman" <ivan@w3.org>
Cc: "Hausenblas, Michael" <michael.hausenblas@joanneum.at>, "Ben Adida" <ben@adida.net>, RDFa <public-rdf-in-xhtml-tf@w3.org>, "SWD WG" <public-swd-wg@w3.org>
Message-ID: <op.tx6jpc18smjzpq@acer3010.lan>

On Fri, 20 Jul 2007 12:24:10 +0200, Mark Birbeck <mark.birbeck@x-port.net>  
wrote:

>
> Hello all,
>
> Is 'instanceof' really so bad? It's been said that it is second-best
> to the more preferable (but taken) @role, @type and @class attributes,
> but I disagree. As a well-known British advert goes: "it does what it
> says on the tin", and I think that mark-up that indicates that we have
> an 'instance of' a foaf:Person (for example), is actually much closer
> to what we want than 'type', 'role' or 'class'.
>
> I also don't believe it is 'RDF-speak', any more than 'class', or
> 'type', or 'resource'. Of course, for someone versed in RDF these
> names will ring bellsand be very clear, but even for someone with no
> RDF background, I don't think they are particularly confusing. The
> notion of 'instances' of something will be pretty clear to most
> authors. And whether we like it or not, I think we do have to accept
> that we can't hide some of the basic concepts.
>
> The other objection I've seen is from Steven, that the name comprises
> 'two words', but with respect that does seem to be a personal
> preference, rather than based on some deep problem. It would be great
> if it was backed by an argument, otherwise we can't actually debate
> it.

Good design is not just about finding something sufficient; there is a  
question of aesthetics too. RDFa markup should be suggestive in what it is  
doing.

If I write

	<p instanceof="my:event">

that p is *not* an instance of a my:event. It contains RDFa statements  
that combined represent a my:event.

But as I have already said, I have other objections to the word  
'instance': it is already used in XHTML documents to mean something else,  
and say what you like, "instanceof" still looks geeky to several  
commentators.

With the exception of the preposition 'about', all RDFa attributes are  
nouns, or abbreviations of nouns. I think we should be consistent in this.

Steven
Received on Wednesday, 5 September 2007 12:01:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:07:51 UTC