add_vertex! should return the added vertex.
So I often write code like
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.
I agree that returning the created vertex would be great, but that would be a big breaking change... Maybe we can consider it for a 2.0 release ?
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:
add_vertex!(g; return_added_vertices=false)
add_vertices!(g; return_added_vertices=false)
and if return_added_vertices is true, we would return the added vertices.
How about starting a roadmap for 2.0 with big breaking changes we would like to see happen? I have a few of my own, eg. #77