And since methods operate on the object they are invoked upon I think the
name is clear
enough.
The fact replace() is a method operating on an object doesn’t clarify the
intention in this case,because the confusion here is that it’s unclear whether
the object is having others take its
Currently the DOM spec defines a replace() method in the ChildNode interface. I
find the name for that method a bit misleading.
When someone says A replace B, I get the impression that B is no longer in
effect and A is the new one. So when I do `node1.replace(node2)`, I can’t help
but feel
On Sat, Jan 10, 2015 at 8:26 AM, Glen Huang curvedm...@gmail.com wrote:
Do you think it would be worthwhile to change to a name that states the
intention a bit clearer?
The general preference is brevity over precision. And since methods
operate on the object they are invoked upon I think the
I have to agree with Glen on this one. Using `node1.replace(node2);` makes
me expect that `node1` will be replacing by `node2`.
jQuery is famous (and sometimes infamous, depending on who you talk to) for
its API brevity and yet we still chose longer names[1] for these scenarios:
`replaceWith` and