W3C home > Mailing lists > Public > public-webapi@w3.org > December 2006

Re: Selectors API naming

From: Ian Hickson <ian@hixie.ch>
Date: Fri, 15 Dec 2006 06:58:03 +0000 (UTC)
To: Charles McCathieNevile <chaals@opera.com>
Cc: Maciej Stachowiak <mjs@apple.com>, Dave Massy <Dave.Massy@microsoft.com>, Anne van Kesteren <annevk@opera.com>, public-webapi@w3.org
Message-ID: <Pine.LNX.4.62.0612150651450.10136@dhalsim.dreamhost.com>

On Fri, 15 Dec 2006, Charles McCathieNevile wrote:
> 
> I can live with something like matchSelector / matchAllSelectors if that 
> would solve the problem (I am also happy with the current names). But I 
> am really not interested in a long discussion about the name - at the 
> end of the day we are almost guaranteed to pick something not quite 
> right, so let's do that early in the morning and spend the day doing 
> real work...

In general I would agree with you, and I'm often seen pointing out that 
names are irrelevant since most Web authors don't speak English anyway and 
thus they are just opaque strings to them.

My only concern here is that we avoid the mistake that was made with 
getElementsByTagName and getElementById -- the names should be easy to 
type and short. I honestly think that if the one-item method is shorter 
than about 6 or 7 characters, then we've made a mistake.

So I think "matchSelector" is too long. I think "matchSingle" is too long. 
I think "select" and "match" are fine.

It doesn't matter what the words actually are. I think "aaaaa" is fine 
too (though it wouldn't be my first choice). As Maciej points out, we just 
have to make sure we don't pick a name that makes everyone just alias the 
method to $ or $$ or something equivalent.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Friday, 15 December 2006 06:58:21 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:18:56 GMT