Skip to content
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

Are you using Unmod interfaces or just the Im (Immutable) ones? #19

Closed
GlenKPeterson opened this issue May 8, 2017 · 1 comment
Closed
Labels

Comments

@GlenKPeterson
Copy link
Owner

This Might be another leftover from before the Clojure collections. The theory was to add Unmod... versions of the major java.util collections that only deprecate the mutate-in-place methods. Then separately add the Im... (Immutable) interfaces that add back change-methods that return a new changed collection. The thought was that people might want to create a different inheritance hierarchy that still fits into the Java hierarchy without adding anything.

A few years later, I'm less enamored with this idea, basically because I haven't used the Unmod interfaces directly, preferring instead to use the Im interfaces. Also, the PersistentVector can go from mutable to immutable. I think that's a much more useful distinction to represent in a hierarchy. In the interest of still keeping the hierarchy simple, I'd like to put all the change methods from the Im interfaces into the Unmod interfaces. Then make Mutable-List/Set/Map extend Unmod-List/Set/Map instead of Im-List/Set/Map.

I know, there's a RangeOfInt. I plan to add an UnmodSizedIterable and have RangeOfInt extend UnmodSizedIterable. I've only ever used RangeOfInt once...

@GlenKPeterson
Copy link
Owner Author

No-one responded, so the toUnmod___ methods are removed from Transformable and the toMutable___ methods return the mutable versions of the Clojure collection implementations, not the java.util ones. These changes will be in the 3.0 release which is on the RRB branch and ready to try out now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1 participant