W3C home > Mailing lists > Public > www-dom@w3.org > July to September 2012

Re: DOM 4 naming "before" and "after"

From: Maciej Stachowiak <mjs@apple.com>
Date: Wed, 22 Aug 2012 12:59:59 -0700
Message-id: <FEFBD5BB-161D-4358-B5B2-56D3B83403BD@apple.com>
Cc: João Eiras <joaoe@opera.com>, "www-dom@w3.org" <www-dom@w3.org>
To: Ojan Vafai <ojan@chromium.org>
The names sound like getters, not mutators. Probably this one naming quirk is one that authors can get used to. But the more of these quirks there are, the more cognitive load it is to use the platform. And the Web Platform already has a lot of strangeness. I don't think we should be spending our strangeness budget on making these particular method names a little shorter.

 - Maciej

On Aug 22, 2012, at 12:13 PM, Ojan Vafai <ojan@chromium.org> wrote:

> These names came from jQuery. In my experience, you get accustomed to them immediately and it's not confusing in practice. Given all that, is there much benefit in going with the longer, bulkier names?
> 
> On Wed, Aug 22, 2012 at 7:41 AM, João Eiras <joaoe@opera.com> wrote:
> Hi !
> 
> The spec [1] defines the new methods "after" and "before". Unlike "prepend", "append", "replace" or "remove", "after" and "before" are not verbs, which makes them a bit less comprehensible.
> 
> Could you rename them to addAfter/addBefore or something equivalent ?
> 
> Thank you.
> 
> [1] http://dvcs.w3.org/hg/domcore/raw-file/tip/Overview.html#mutation-methods
> 
> 
Received on Wednesday, 22 August 2012 20:00:27 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 22 August 2012 20:00:34 GMT