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

Rename 'select' to 'filter' to match native method #6

Open
karlbohlmark opened this issue Nov 9, 2012 · 3 comments · Fixed by #18
Open

Rename 'select' to 'filter' to match native method #6

karlbohlmark opened this issue Nov 9, 2012 · 3 comments · Fixed by #18

Comments

@karlbohlmark
Copy link

Why not use the same name for filtering as the native ecmascript 5 method?

Another reason is that it's particularly confusing for .net developers since in .net the map method is called select.

http://msdn.microsoft.com/en-us/library/system.linq.enumerable.select.aspx

If you'd like to keep this rubyism, maybe it would be worth doing what underscore does and make it an alias for filter?

@tj
Copy link
Member

tj commented Nov 9, 2012

filter is a shitty name IMO it's ambiguous, but we could alias

@karlbohlmark
Copy link
Author

You decide, I'd say that select is pretty ambiguous too, since it could be interpreted as 'pluck'. "From each item, I'd like to select this property".

@tj
Copy link
Member

tj commented Nov 9, 2012

I suppose, select > filter for me but it doesn't hurt to alias

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 a pull request may close this issue.

2 participants