DEV Community

Discussion on: Functional Programming in JavaScript? Yes, Please.

Collapse
 
paulraines68 profile image
Paul Raines

Some dictionaries use "remove" in their definition but most define the verb filter as simply passing something through a filter (noun). As a verb, filter is most often followed by either "for" or "out" to make it clear. So even in the 1800's I think a gold miner would say he is using his mesh pan "to filter for gold".

Collapse
 
bcallaars profile image
Joseph Callaars

I accept your explanation, and I fully understand it, albeit I don't agree. When working with computers, a filter means to take impurities out, e.g. a spam filter. So I do understand that this is due to dynamics of a language, but if it was in my code I'd be confused if I saw it used this way.

But again, thanks for your comment :).

Thread Thread
 
zerdnelemo profile image
zerdnelemo

I think that the meaning of "filter" remains the same. And the concept we can apply in programming is filter removes the "impurities", keeping only the desirable data by passing the a parameter (the desirable condition).