Re: Why bound prefixes are an anti-pattern in language design

On Tue, 11 Aug 2009, Martin McEvoy wrote:
> Ian Hickson wrote:
> > 
> > Here is a page marked up with HTML5 microdata: 
> > http://getsemantic.info/test/dataset.html
> >
> > (Note that this uses unregistered terms, so it is invalid. Unless you 
> > use one of the predefined vocabularies, all identifiers should have 
> > either a "." or a ":" in it.)
> 
> What do you mean "unregistered terms" ?

Terms that aren't part of a predefined vocabulary.


> > This example (with its external indirections) is a great example of 
> > the problem. What happens if someone copies the body of your document 
> > but doesn't realise the <link> is relevant? This kind of thing _will_ 
> > happen on the Web. It happens all the time. This is one reason 
> > prefixes are so bad, and it affects that kind of declaration mechanism 
> > also.
> 
> Ian copy and paste is not a problem of HTML5 never has been an never 
> will be, you waste far to much time with that, its the problem of "copy 
> and paste", the same is also true for the style sheet, javascript or any 
> other kind of script for that matter, if an author doesnt understand 
> this when he is "copy and pasting" then really its his look out not 
> mine.

That's one possible attitude. It's no the attitude that I am using in the 
design of HTML5. We have ample evidence that authors do in fact write 
pages in this manner, near-randomly copying and pasting markup all over 
the place. You are welcome to design technologies that don't take this 
into account, but in HTML5 this is something that I _do_ want to take into 
account. Microdata is more resilient to this behaviour than RDFa. This is 
not an accident, it is a design decision. I believe it is a prerequisite 
for this kind of technology: where we can make our languages resilient to 
copy-and-paste, we must do so.

CSS is resilient to it in that any mistakes are immediately obvious, and 
redundant style sheet rules are harmless.

JavaScript is as resilient to it as I can see us making it; I don't know 
of any proposals that would make it better.

You might not care about these authors, but I do.


> > > The big long strings ie: org.example.animal.cat and 
> > > org.example.name, ok they are not "particularly" long strings but I 
> > > can see authors writing things like com.example.tag.cat# there is no 
> > > real difference in what I stated above, its a good idea I think to 
> > > drop reverse DNS from the HTML5 spec, there is really no need for it 
> > > to be there, if you do I expect people will warm to microdata a lot 
> > > more.
> > 
> > I don't understand what you mean.
>
> ?  please explain

I do not understand your reasoning in the quoted paragraph above. 
Everything from "The big long" to "what I stated above" makes no sense to 
me.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

Received on Tuesday, 11 August 2009 23:17:47 UTC