enumerable icon indicating copy to clipboard operation
enumerable copied to clipboard

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

Open karlbohlmark opened this issue 13 years ago • 3 comments

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?

karlbohlmark avatar Nov 09 '12 17:11 karlbohlmark

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

tj avatar Nov 09 '12 17:11 tj

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".

karlbohlmark avatar Nov 09 '12 17:11 karlbohlmark

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

tj avatar Nov 09 '12 17:11 tj