W3C home > Mailing lists > Public > public-webapi@w3.org > January 2007

Re: Selectors API naming

From: Simon Pieters <zcorpan@gmail.com>
Date: Fri, 26 Jan 2007 23:52:09 +0100
To: "Charles McCathieNevile" <chaals@opera.com>, João Eiras <joao.eiras@gmail.com>
Cc: "Web APIs WG" <public-webapi@w3.org>
Message-ID: <op.tmr9s7gm7a8kvn@hp-a0a83fcd39d2>


On Fri, 26 Jan 2007 23:10:47 +0100, Charles McCathieNevile  
<chaals@opera.com> wrote:

> On Fri, 26 Jan 2007 06:34:28 -0500, Simon Pieters <zcorpan@gmail.com>  
> wrote:
>> Please note though that Robert typoed the method name. Aditionally, I 
>> typoed it too
> Sure. You also made a typo with Additionally, above.

Well. That was a misspelling, actually. English isn't my first language.

>> ...and that typo really wasn't intentional just to prove a point. It is 
>> easily typoed and I think that is a serious problem.
> Our judgement was based on the fact that in general people who are prone  
> to
> typos debug them, or use a tool to avoid making such problems.

I've seen these methods be spelled incorrectly almost as often as they  
were spelled correctly, mostly due to wanting to type "ElementsList"  
instead of "ElementList", and omitting the trailing "s" from "Selectors".

A way to reduce the number of typos might be to drop the trailing "s" from  
both method names. It's equally clear what it does IMHO.

Of the two getElementListBySelector and getElementsBySelector, the people  
I've spoken to seem to prefer getElementsBySelector.

> The reason for GetElementListBySelectors and not getElementsBySelectors  
> was to
> make it moderately clear and give people a better chance of debugging  
> quickly.

Although if API consistency is desireable then "getElementListBy..."  
doesn't seem to appear anywhere as far as I can tell.

Simon Pieters
Received on Friday, 26 January 2007 22:52:18 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:16:22 UTC