News for hackers. Stuff that matters.
Re:Why I'm still using Python by klyrs on Friday December 30, 2022 @06:50PM (#34191594)
What you're saying is not true of the most popular graph package in Python (networkx). Graphs there are objects with attributes (edges, nodes, etc) and methods (add_edge, etc), but algorithms such as shortest paths are functions as you have called most natural: shortest_path(G, a, b)
Re:Why I'm still using Python by abdullahkhalids on Saturday December 31, 2022 @12:37AM (#34193923)
Well, I am glad that at least this library is being functional, rather than object oriented.

I wish all the others did as well.

Re:Why I'm still using Python by klyrs on Saturday December 31, 2022 @02:33PM (#34199851)
It's still object-oriented, though. The graphs themselves are objects, which helps with ergonomics.

There are also functions that operate on graphs, because the alternative would be to stuff perhaps thousands of methods into the graph class -- which would be extremely annoying to maintain as well as abysmally slow.