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

array: remove S.pluck #484

Merged
merged 1 commit into from
Feb 4, 2018
Merged

array: remove S.pluck #484

merged 1 commit into from
Feb 4, 2018

Conversation

davidchambers
Copy link
Member

I don't see a compelling reason to provide a shorthand for map + prop but not for map + get. I also don't find the shorthand clearer:

S.map (S.prop ('foo'))
S.pluck ('foo')

The problem with the shorthand is that I forget which of the two possible combinations it is short for. ;)

@davidchambers davidchambers requested a review from svozza January 30, 2018 20:06
Copy link
Member

@Avaq Avaq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I never use pluck.

@Avaq
Copy link
Member

Avaq commented Jan 31, 2018

I don't see a compelling reason to provide a shorthand for map + prop but not for map + get.

Wait.. what? There are either one too many negatives in this sentence, or a "but" where there should be an "and".

@davidchambers
Copy link
Member Author

I think what I wrote makes sense, Aldwin. I was trying to state that I don't see a reason to do A but not B. In other words, if we do A we should also do B. The implication is that in this case doing both A and B is silly, so we should not do either.

Too much negation, though, I agree. :)

@Avaq
Copy link
Member

Avaq commented Jan 31, 2018

Ahh. I was reading:

I don't see a compelling reason to (provide a shorthand for map + prop) (but not for map + get).

But you meant:

I don't see a compelling reason to provide a shorthand for (map + prop) (but not for map + get).

I read it so many times over and missed that. Okay. All clear now! ;)

@davidchambers
Copy link
Member Author

This (is (why)) (I (am)) (so) (fond) (of (parentheses)). ;)

@miwillhite
Copy link

I used map(prop('foo')) the other day thinking that Sanctuary wouldn't have pluck (it seems a bit contrary to the simplistic nature of Sanctuary)…then was surprised when I scrolled past it later. I didn't update my code…so I think 👍 from me too ;)

@stefano-b2c2
Copy link

Ha. You've had it in for this function from pretty much day one, David.

@davidchambers davidchambers merged commit cbcb858 into master Feb 4, 2018
@davidchambers davidchambers deleted the davidchambers/no-pluck branch February 4, 2018 11:57
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.

4 participants