Skip to content

this "when to use section" is misleading #84

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

Closed
wants to merge 1 commit into from

Conversation

hiredman
Copy link
Contributor

@hiredman hiredman commented Mar 3, 2016

I think a when to use section would be nice to have, but the current one only makes sense as a set of restrictions applied to fold, not reducers in generally.

If you look at http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html under the heading "More Opportunity (i.e. Work)" rhickey explicitly called out reducers as a mechanism for solving "the lazily dangling open resource problem"

I think a when to use section would be nice to have, but the current one only makes sense as a set of restrictions applied to fold, not reducers in generally. 

If you look at http://clojure.com/blog/2012/05/08/reducers-a-library-and-model-for-collection-processing.html under the heading "More Opportunity (i.e. Work)" rhickey explicitly called out reducers as a mechanism for solving "the lazily dangling open resource problem"
@puredanger
Copy link
Member

Re fold, that makes sense, but we could just change the heading rather than removing it.

Re the other point, are you suggesting that this should be added? Trying to square that comment with the suggested change which doesn't seem to address that.

@hiredman
Copy link
Contributor Author

hiredman commented Mar 4, 2016

I am pointing to the blog post about reducers as, uh, supporting testimony, that the advice in the "When to use" section is not valid for reducers in general. I am not suggesting that needs to be added. Alternatively the "When to use section" could be re-titled as "When to use fold".

I have been advocating reducible collections as a great way to model resources but today someone in slack pointed out this "When to use section" as seeming to be counter to that. Given my understanding of reducible collections, and the initial blog post announcing them, I think the "When to use" section is in error. Its advice about avoiding IO and blocking make sense for fold but not for reduce in general. Given how much nicer I think reducible collections are for modeling resources, and how hard it is the pry seqs out of the hands of Clojure programmers, it would nice if the Clojure website didn't give (what is in my opinion) incorrect advice on the topic.

@puredanger
Copy link
Member

Made some alternative mods in c1ef589

@puredanger puredanger closed this Mar 4, 2016
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