[Webkit-unassigned] [Bug 24760] Clean up Position.h

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Mar 23 11:02:23 PDT 2009


https://bugs.webkit.org/show_bug.cgi?id=24760





------- Comment #4 from eric at webkit.org  2009-03-23 11:02 PDT -------
(In reply to comment #3)
> Why are you removing clear()? I like clear(), and all the functions where
> you’re removing it seem, well, less clear after the change. What does removing
> it have to do with the other changes you’re planning?
>
> r=me, but really?

Maybe I should toss this one then.

My coding experience has lead me to dislike clear()/reset()/init() functions. 
So easy to add to a class and forget to update all the "clear the state"
functions.

In this case, I think I was more interested in making Position immutable.  You
create a (lightweight) Position object once, and then you never edit it.

This is the third time I've started a "fix Position" patch (I'm certainly not
complaining), this time I was trying to do all the little things first, before
getting to the meat.  But maybe the little thing of killing clear() is not
important.  I think you and I should have a heart-to-heart about clear() and
why you like it and I don't over IRC some time.  Maybe there is some CS design
book/principle which would make me like the clear() model over the "reset using
a copy constructor and default initializer" model.

The main goal at the end of this rewrite, is to get rid of the [node, 0] can
mean two different things depending on what editingIgnoresContent(node)
returns.


-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list