View#remove() could be better
wilsonpage opened this issue · 1 comments
wilsonpage commented
We currently have:
view.add(someview);
and
view.remove();
It would make more sense if View#remove()
mirrored View#add()
view.remove(someview);
possibly still supporting:
view.remove();
@matthew-andrews do you agree with this?
matthew-andrews commented
An other alternative to consider:-
view.children.add(someview);
view.children.remove(someview);
Or
view.addChild(someview);
view.removeChild(someview);
I know how you're fond of single word functions but those function names are crystal clear.
I'm also broadly happy with the single word add
, remove
API spec'd in your comment above with the slight preference for the more explicit parent.remove(child);
type over child.remove();
. We could continue to support the latter without docs for now, as you said, and see how people (we) use it.