Re: Selectors API Method Names

On Jul 2, 2007, at 3:50 PM, Charles McCathieNevile wrote:

>
> On Mon, 02 Jul 2007 20:17:40 +0200, Doug Schepers  
> <doug.schepers@vectoreal.com> wrote:
>
>> Hi-
>>
>> Maciej Stachowiak wrote:
>>>  I don't have a strong objection either way, but I think the case  
>>> against Lachy's original names (selectElement, etc) has been laid  
>>> out more clearly than the case against cssQuery. I think  
>>> selectorQuery (as suggested in follow-ups) would also be ok.
>>
>> I think that the chief problem with cssQuery*() for me is that it  
>> is rather confusing.  Such a name would indicate functionality  
>> related to CSS (that is, something presentational or style- 
>> oriented), rather than the accident of a historical relationship.   
>> It totally fails the criteria of being functionally descriptive,  
>> which selectElement() meets (other merits notwithstanding); this  
>> is a point on which I think we can build consensus and compromise  
>> (and hopefully a speedy resolution).
>>
>> Similarly, with selectorQuery() (which is better), you lose the  
>> verby "action word" of the existing naming convention (getAByB);  
>> selectorQuery sounds more like a property than a method.
>>
>> Frankly, I'm not a fan of any of the present crop of names, but in  
>> the interest of keeping forward momentum, I least object to what  
>> we currently have, selectElement*().
>
> Thank you Doug for so eloquently stating the details of my  
> objection. As it happens, I agree with you that I would rather move  
> forward with the consensus on selectElement*, if we establish that,  
> than keep chasing round for new names.

I really think the confusability of this with selectNodes/ 
selectSingleNode is a significant problem. matchSelector  or  
querySelector doesn't have this problem, and also doesn't have the  
problems of cssQuery (slightly inaccurate mention of css, doesn't  
sound like a verb phrase).

But I won't stand in the way of an editorial decision on this one.

Regards,
Maciej

Received on Tuesday, 3 July 2007 00:01:35 UTC