-
Notifications
You must be signed in to change notification settings - Fork 115
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
Consider renaming TreeUtils
and/or Graphs
#166
Comments
I don't particularly consider JUNG to be an extension to common.graph, but a client of it, but that's a minor issue. I agree that their style and practices are generally worth emulating, though. I don't really care about backwards incompatibility in this context, because 3.0 is one ginormous breaking change as it is, and we're already going to need to write a migration guide. :) Guava has used I agree that we should not have two different static-utility-method-holding classes named Option (1) is fine by me. |
Great! Thanks for your response @jrtom. Apologies for only responding just now, this issue fell off my radar! I've had another look at |
Only ~2 years later (sorry about that)...yes, I think your suggestion of moving those specific methods to That said, a related issue we may want to tackle (either separately or in concert), brought up here: #244 (review) tl;dr: we're inconsistent in our use of the term "Tree" in our APIs. :P |
As I was working on tests for #83, I noticed first of all that
TreeUtils
andGraphs
, both being utility classes, have inconsistent names, and secondly thatGraphs
's name conflicts with Guava'sGraphs
class.AFAICT, we have a few options:
Rename
TreeUtils
toTrees
andGraphs
toMoreGraphs
.Pros:
a.
TreeUtils
andGraphs
would be more self-consistent, reducing surprise for new users.b. Guava naming conventions would be followed, reducing surprise for those already using Guava.
c. Users wouldn't be forced to write
edu.uci.ics.jung.graph.util.Graphs
orcom.google.common.graph.Graphs
to use bothGraphs
classes in the same source file.Cons:
a. Existing users may be surprised by this change.
b. It would be backwards incompatible.
Rename
Graphs
toGraphUtils
.Pros:
a.
TreeUtils
andGraphs
would be more self-consistent, reducing surprise for new users.b. Users wouldn't be forced to write
edu.uci.ics.jung.graph.util.Graphs
orcom.google.common.graph.Graphs
to use bothGraphs
classes in the same source file.Cons:
a. Existing users may be surprised by this change.
b. It would be backwards incompatible.
c. Users coming over from Guava would be surprised by the use of "*Utils" instead of "*s" for utility classes pertaining to graph data structures.
Do nothing.
Pro:
a. No extra changes on our part.
Con:
b. New users and users coming from Guava would be surprised by the naming inconsistency.
IMO, option (1) is the best, as it aligns our naming conventions closer to Guava's, and I consider JUNG 3.0 to be an extension to
com.google.common.graph
.@jrtom @tomnelson WDYT? I'm happy to create a PR if we decide to do something about this.
The text was updated successfully, but these errors were encountered: