Rename "length" to "depth" and make "parent" more useful #457
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The term "depth" is arguably more intuitive when expressing how far away from the root a graph's node is, so this should hopefully reduce the barrier to entry for learning the Hypermine codebase.
As for "parent", previously, it was often interpreted as though every node (except the root) has one parent, even though most logic took all "shorter neighbors" into account, so "parent" now refers to any neighbor node closer to the root. The old meaning of parent is renamed to "primary parent", which is the parent with the first side in enum order.
Given that I hope to add the new terminology of "peer" nodes into the code base, I think it makes sense to rethink existing terms to make sure they're consistent with each other and with what one might expect. I would like to rename some of the terminology in
dodecaas well, but I'm less sure about the right terminology, so I'll need to think on it some more and/or open an issue.