Closed Vithanco closed 3 weeks ago
What's the use case?
I am working on some functional code. I want to create rather a new graph then changing the old one.
I guess I don't understand. Why can't you just not mutate it? Just because there are mutable methods there, it doesn't mean you have to use them.
Of course, that is a possibility. I guess, i have my answer - and I fine with it. ;-)
I would like to create a struct that adheres to the Graph Protocol. However, the protocol has setters as requirements, making it impossible to implement an immutable graph structure. I assume that the algorithms don't need a MutableGraph.
Would you be open to a separation into Graph and MutableGraph? I could do a PR, but would need indication that it is of interest before. ;-)