Skip to content
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

support pushfirst!(parent::Node, child::Node) #29

Merged
merged 1 commit into from
Nov 1, 2024

Conversation

guo-yong-zhi
Copy link
Contributor

No description provided.

@joshday joshday merged commit b6f934f into JuliaComputing:main Nov 1, 2024
15 checks passed
@guo-yong-zhi
Copy link
Contributor Author

And can we have emptychildren!(parent::Node)?
If you don't want to add too many proxy api for children,
should we allow people to do something like func!(parent.children)?
Or, func!(children(parent))? (Promise that the children(parent) return a reference when it's not empty)
Or, func!(children!(parent))?

@joshday
Copy link
Member

joshday commented Nov 2, 2024

I think we could just let empty!(::Node) perform the action of emptying the children Vector.

My idea here is that a Node should act like a Vector in regards to children and act like a (mutable) NamedTuple in regards to attributes.

@guo-yong-zhi
Copy link
Contributor Author

but... how to empty! its attributes?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants