W3C home > Mailing lists > Public > xmlschema-dev@w3.org > July 2012

Re: The Rule of Least Power

From: Noah Mendelsohn <nrm@arcanedomain.com>
Date: Sun, 01 Jul 2012 20:49:22 -0400
Message-ID: <4FF0F012.7070304@arcanedomain.com>
To: Kevin Braun <kbraun@obj-sys.com>
CC: xmlschema-dev@w3.org


On 6/28/2012 9:16 AM, Kevin Braun wrote:
> In fairness to the authors of the document that Roger mentioned
> (http://www.w3.org/2001/tag/doc/leastPower.html), I think it should be
> pointed out that they actually were addressing, I think, a more narrow
> question.

> The referenced paper gives the rule of least power as "Use the least
> powerful language suitable for expressing information, constraints or
> programs on the World Wide Web."  The paper is concerned with maximizing
> the reusability of information published on the Web.  I don't believe
> they intended to establish a broad architectural principle such as
> "choose the least powerful, suitable way to do anything".


Thank you. That's exactly right. I confess that I find this thread a little 
troubling, since the finding seems to be criticized for things it isn't saying.

Let's imagine what could have been a simple Web page with, say, a price 
list. If you put it up on the Web in HTML, automated agents like search 
engine crawlers have at least a decent chance of parsing the content and 
extracting at least some of the intended information. If you write the same 
page using (to take an extreme example), an empty <body>, and use 
Javascript at runtime to build up a DOM that renders the same price list, 
then few crawlers will do as well figuring out what's going on. Indeed, we 
know that a crawler can't even determine in all cases whether the 
Javascript will complete its work (the halting problem).

So the finding is saying: consider that tradeoff when you publish 
information on the Web. It's not saying "don't use Javascript"; it's saying 
that when you do there's often a cost. I think that's an important and 
valid message.

Roger Costello paraphrased the rule as:

> The rule of least power says that given a choice of suitable ways to implement something, choose the least powerful way.

I'm glad Roger found the rule interesting and useful, but I think the 
paraphrase is way too strong, and much of this thread seems (to me) to be 
critiquing that stronger formulation. First of all, as already noted the 
rule in the Finding is particular to the Web:

"Good Practice: Use the least powerful language suitable for expressing 
information, constraints or programs on the World Wide Web."

Furthermore, immediately under that guidance, the Finding goes on to say:

"In aiming for simplicity, one must of course go far enough but not too 
far. The language you choose must be powerful enough to successfully solve 
your problem, and indeed, complexity and lack of clarity can easily result 
from clumsy efforts to patch around use of a language that is too limited. 
Furthermore, the suggestion to use less powerful languages must in practice 
be weighed against other factors. Perhaps the more powerful language is a 
standard and the less powerful language not, or perhaps the use of simple 
idioms in a powerful language makes it practical to use the powerful 
languages without unduly obscuring the information conveyed (see 3 Scalable 
language families). Overall, the Web benefits when less powerful languages 
can be successfully applied. "

Maybe I'm too close to this one,  but that seems pretty balanced and 
appropriate to me.

Noah
Received on Monday, 2 July 2012 00:49:56 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 July 2012 00:49:56 GMT