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

Re: Selectors API Method Names

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 28 Jun 2007 17:37:45 +0000 (UTC)
To: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Cc: Maciej Stachowiak <mjs@apple.com>, public-webapi <public-webapi@w3.org>
Message-ID: <Pine.LNX.4.64.0706281729430.32200@dhalsim.dreamhost.com>

On Thu, 28 Jun 2007, Lachlan Hunt wrote:
> 
> I'd have to make cssQuery() be the method that returns the node list 
> because Dean Edward's implementation uses the same name to return an 
> array.  The question is then what to call the singular method.
> 
> There has been an argument made that the shorter name should return the 
> single element, though I don't believe it's particularly strong.  Since 
> I can't think of any reasonable alternative shorter than cssQuery(), 
> cssQueryOne() would be acceptable.
> 
> Would others accept changing the methods to cssQuery() and 
> cssQueryOne()?  If this would achieve concensus, I'd be willing to use 
> these names.

I'll accept whatever the editor comes up with, but I really do think that 
if our array name is shorter than the single node name, we'll end up with 
people using that instead, which defeats the whole point of having two 
methods. I can't really come up with better names that start with "CSS" 
though, especially given the constraint in the first paragraph above.

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 28 June 2007 17:37:58 GMT

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