W3C home > Mailing lists > Public > public-rdf-in-xhtml-tf@w3.org > August 2009

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

From: Danny Ayers <danny.ayers@gmail.com>
Date: Thu, 6 Aug 2009 14:39:13 +0200
Message-ID: <1f2ed5cd0908060539k215c11eaqaf9504596335dde9@mail.gmail.com>
To: Ian Hickson <ian@hixie.ch>
Cc: Martin McEvoy <martin@weborganics.co.uk>, RDFa Developers <public-rdf-in-xhtml-tf@w3.org>
2009/8/6 Ian Hickson <ian@hixie.ch>:

> Three sets:
>
>   <element xmlns:one="two" one:three="value" />
>
> ...forming the pair {two, three}.

Ok, I see a pair too.

>> > data-* isn't such a mechanism, since "data-" isn't explicitly bound to
>> > anything, and doesn't mean anything but "data-".
>> >
>> > I have a problem with mechanisms that separate parts of an identifier
>> > for a variety of reasons.
>> >
>> > Copy-and-paste of the source becomes very brittle when two separate
>> > parts of a document are needed to make sense of the content.
>>
>> Fair point, but does this outweigh the benefits of extensibility?
>
> That's a judgement call, but personally, I would say no, not even
> remotely. Far more people benefit from easy copy-and-paste than benefit
> from extensibility. What's more, the people who benefit from this kind of
> extensibility tend to be the experts, whereas the people who benefit from
> the ability to copy-and-paste tend to be the novices. So IMHO it's a
> pretty easy judgement call: copy-and-paste is important.

Judgement call for sure. But I believe your premise is flawed. I think
I'm fairly safe in assuming for example more people use the WYSIWYG
interface of Wordpress than copy-and-pasting raw markup.

>> > Copy-and-paste is how the Web evolved, so I think it is important to
>> > keep it functional and easy.
>>
>> Yes, but it *did* evolve -
>
> Should it stop evolving? That's a depressing thought.

Quite the opposite of what I'm suggesting. Namespaces (and their
prefixes) offer an open-ended route to evolution, not locked to
whatever a specific interpretation mechanism (i.e. your favourite
browser) can do.

>> what proportion of Web pages do you think were created through c&p now?
>
> A huge amount. I'd be shocked if many of the WordPress templates were
> created from scratch, for instance -- I expect most of them are created by
> varying pre-existing templates. That's certainly how we seem to write
> specs at the W3C -- has anyone ever written a W3C spec by starting from a
> blank page rather than starting from a template or another spec and
> replacing the meat?

What proportion of Wordpress users do you think use the templates off
the shelf? Ok arguably that's copy & paste, but it's independent of
the complexity of the template.

>> > Prefixes are notoriously hard for authors to understand. As far back
>> > as 2004, Micah wrote "As the author of an O'Reilly book on XForms, I
>> > can report that 90% of the technical questions from readers involve
>> > confusion related to namespaces".
>>
>> Yet most programmers somehow seem to get their heads around namespaces
>> for their libraries, and XML namespaces has not-insignificant
>> deployment.
>
> Every year, people in the US wrap their heads around the US Tax code, but
> that doesn't mean that its complexity is acceptable.

Every year people put one foot in front of the other and manage to
walk. The physics is non-trivial yet it works.

>> >   http://www.w3.org/2004/04/webapps-cdf-ws/papers/verity.html
>> >
>> > Parand Darugar has said similar things: "Experience shows XML
>> > namespaces can be a common cause of confusion and a major complicating
>> > factor in XML adoption."
>> >
>> >   http://www.ibm.com/developerworks/library/x-abolns.html
>> >
>> > Fundamentally, prefixes are an indirection model. Indirection models
>> > are very, very hard for people to understand.
>>
>> Spurious claim.
>
> I disagree; I think the (admittedly circumstancial and anecdotal) evidence
> I listed in my e-mail is enough to demonstrate that this is true.

Right. If you give me 5 minutes with Google I'm sure I can find
anecdotal evidence that Jesus loves SOAP.

>> The whole notion of a markup language is based on indirection - the
>> syntax is attached to some kind of dispatching mechanism to interpret it
>> - you don't get to follow a link by magic.
>
> The more layers of indirection you add, the more complex a system becomes.
> Just because we got away with one layer, doesn't mean we should jump up
> and add another.

There's no jumping up needed - it can be ignored by them that don't want it.

> (But I don't think authors see markup as an indirection mechanism, I think
> they see it as a direct means of expression.)

Fair point, but I reckon most authors don't care about the markup at
all - the Wordpress WYSIWYG thing again.

>> > Maciej has also said things to this effect: "Namespaces are an example
>> > of the Fundamental Software Engineering Error, which is that something
>> > too terrible to actually use can be fixed by adding a level of
>> > indirection. Sometimes that is true but software engineers try to do
>> > it even when it clearly is not."
>>
>> Whether or not prefixes are appropriate for HTML5, your stance is not
>> solid. You might as well argue that there's no point in any
>> specification - why put a "<" at the start of a tag when you have to
>> indirect to a parser...
>
> I have no idea what you mean here.

Hoping to make the point that software is a world of indirection (for
practical purposes by definition) so pretending one form of
indirection is more palatable than another is unwise.

>> Hope I irritated you enough for you to think about this.
>
> I have thought about this a lot, over many years.
>
> Have I irritated you enough for you to think about it also?

Many years too, hence my (rather grumpy) comments.

Cheers,
Danny.

-- 
http://danny.ayers.name
Received on Thursday, 6 August 2009 12:39:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Thursday, 6 August 2009 12:39:54 GMT