Skip to content

List _all_ operations available via implicit enrichment in README #59

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

Merged
merged 2 commits into from
Oct 23, 2019

Conversation

erikvanoosten
Copy link
Contributor

In README.md this removes the incomplete list with operations available via implicit enrichment and replaces it with a link per decorator and a plain text list of all available operators per decorator.

@erikvanoosten
Copy link
Contributor Author

I have signed the Scala CLA.

@linasm
Copy link
Contributor

linasm commented Oct 23, 2019

@erikvanoosten are you sure listing all methods on each collection is a good idea?

I mean, most of the new methods are inherited from Iterable by the whole collections hierarchy. And you wouldn't want to mention them all (eg. Vector, etc.) in the README. On the other hand, the new generic methods would get listed on BitSet now, only because accidentally BitSet got some specific methods added to it.

IMHO this would make it harder to identify the methods added to specific subhierarchies of collections.

@erikvanoosten
Copy link
Contributor Author

erikvanoosten commented Oct 23, 2019

No, I am not sure of that :)

What initiated this pull request is that I was unaware of Iterator.splitBy. I assumed Iterator was not enriched by this library and wrote it myself. Then when I wanted to contribute it, and looked in the source it was already there!

What might be better is to just have the list of enriched traits and leave out the operations, OR
list just a few important operations and then say something like '...' or 'and more'.

@erikvanoosten
Copy link
Contributor Author

Another option is to list the operations, and for each (group of) operation mention for which traits it is implemented.

@julienrf
Copy link
Collaborator

I think keeping this list up to date will be complicated. What about just linking to each decorator documentation?

BTW, I’m surprised to see MapDecorator methods available on IterableDecoratorhttps://static.javadoc.io/org.scala-lang.modules/scala-collection-contrib_2.13/0.2.0/scala/collection/decorators/IterableDecorator.html

@linasm
Copy link
Contributor

linasm commented Oct 23, 2019

What initiated this pull request is that I was unaware of Iterator.splitBy.

Well, Iterator / Iterable are different branches of collections hierarchy and so they got separate decorators in this library. I guess some level of README duplication in case like this actually makes sense.

@erikvanoosten
Copy link
Contributor Author

I removed the implied operations and appended ... to make the curious reader follow the link. WDYT?

@julienrf julienrf merged commit 76719f5 into scala:master Oct 23, 2019
@julienrf
Copy link
Collaborator

Thanks Erik!

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.

3 participants