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

Unleashed javaslang.collection.Iterator. Refactored Collections. #439

Merged
merged 3 commits into from
Aug 7, 2015
Merged

Unleashed javaslang.collection.Iterator. Refactored Collections. #439

merged 3 commits into from
Aug 7, 2015

Conversation

danieldietrich
Copy link
Contributor

@danieldietrich
Copy link
Contributor Author

@ruslansennov I'm on vacation with my family for one week, starting tomorrow. Notebook has to stay home o_O... I will try to go online at most once a day. We will see.

@danieldietrich
Copy link
Contributor Author

@ruslansennov I refactored the collections a little bit. Please have a look (HashSet, HashMap). There is now javaslang.collection.Iterator...

danieldietrich added a commit that referenced this pull request Aug 7, 2015
Unleashed javaslang.collection.Iterator. Refactored Collections.
@danieldietrich danieldietrich merged commit 69952ae into vavr-io:master Aug 7, 2015
@ruslansennov
Copy link
Member

Have a nice trip! It's a good idea to leave the laptop at home

@danieldietrich
Copy link
Contributor Author

Yes...

@danieldietrich
Copy link
Contributor Author

I made HAMT and Interface. That leaks the inner classes to the public.

Pro: this enables pattern matching by subtype, 'introspection' and Proxying of the HAMT.

Con: the public API shows more classes

I'm not sure. We can switch back, when in doubt. The RedBlackTree is also designed as Interface with inner static classes. I like interfaces in general. They are more flexible, and it seems a good design practice to me.

@ruslansennov
Copy link
Member

Con: the public API shows more classes

This was the reason I chose abstract class instead of interface
But there is not problem, I believe it's just a matter of taste

@danieldietrich
Copy link
Contributor Author

Ok. Abstract classes were always some intermediate types to me, not intended to be directly used other than extending them for own types. We will go with interfaces for now. I hope that Java 9 gives us some extra syntax regarding interfaces to hide private methods and maybe private inner classes. We will see.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants