-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rename IInheritable::InsertParent to improve clarity of intent #11820
Conversation
I'm not sure I understand the parenting and priorities well enough to reason whether this is clearer or not. There's both a parent/child tree and an importance value assigned to each of them depending on whether they're push_front or push_back'd into the list of parents? Yes? |
Yeah you could also call it
|
I think the correct term for our inheritance tree is a "ordered anti-arborescence" -- a directed acyclic graph, where lists of paths are ordered and there's only one path at most between any 2 vertices. The ordering is important, because if a settings item doesn't exist the "first" parent that has it set will win and return the value. That way the base layer is preferred over the defaults. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!!!
Hello @zadjii-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This is a followup commit for 168d28b.
By renaming
IInheritable::InsertParent(com_ptr)
andInsertParent(size_t, com_ptr)
intoAddLeastImportantParent(com_ptr)
and
AddMostImportantParent(com_ptr)
respectively, we can improvethe clarity of our code's intent without the need for comments.
PR Checklist