[webkit-dev] Rename of selfOnlyRef to guardRef - ok if I change it back? (was Re: DOM tree traversal on detached nodes)
Darin Adler
darin at apple.com
Fri Jun 15 09:30:22 PDT 2012
On Jun 15, 2012, at 12:12 AM, Roland Steiner wrote:
> I made the original name change, because I honestly was entirely confused about the meaning of "selfOnlyRef" (it's done by Node on Document, so what is "self"? Why is it needed?)
A good rule of thumb, the one that I use, is that a name like this shouldn't be changed when you still don’t understand the meaning of the original name. Changing a name you fully understand, but find unclear, is OK.
I can see why “selfOnlyRef” is not clear to you, and I agree with Maciej that “guardRef” is even less clear. We can probably come up with a better name. For clarity, what we want is a name that means “parent only, not including children”.
My personal rule of thumb stems largely from my experience on a project 20 years ago where I was confused by the term “page frame” and because I found it unclear changed it one I found clearer “physical page” and also introduced the term “logical page”. I later learned that “page frame” was a term of art, one that I would have learned if I had taken an OS class, and I would have been better off if I had held off on changing the name until I understood the original one.
-- Darin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120615/02bf4d03/attachment.html>
More information about the webkit-dev
mailing list