You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
add_vertex!(tree) # returns "true" for some reason ???
v = last(vertices(tree))
...
wouldn't it be great if add_vertex! returned something useful, and guaranteed to be the fresh vertex added, instead of a boolean that I can't imagine a use for? PROPOSAL
v = add_vertex!(tree) #new vertex is the return value!
Let me know if I'm missing something. If people love that boolean (Why???) we can always pass it as the first argument but on the whole this would just be way better.
The text was updated successfully, but these errors were encountered:
That would indeed be a breaking change, but it is also very useful, as the current behavior always assumes that the added vertex has the identifier nv(g). In the meantime we could change the functions to something like:
So I often write code like
wouldn't it be great if
add_vertex!
returned something useful, and guaranteed to be the fresh vertex added, instead of a boolean that I can't imagine a use for? PROPOSALLet me know if I'm missing something. If people love that boolean (Why???) we can always pass it as the first argument but on the whole this would just be way better.
The text was updated successfully, but these errors were encountered: