5 ms·
The word "filter" is an auto-antonym. It means both to remove (filter out) unwanted things as well as to keep (filter in) wanted things.
by hoosieree 3y ago
The word "filter" is an auto-antonym. It means both to remove (filter out) unwanted things as well as to keep (filter in) wanted things.
- Retr0id 3y agoAnd yet, if I hadn't specified, it would've been ambiguous.
- faitswulff 3y agoTangential, but this is why I still love Ruby's Enumerable module; it has `#select` and `#reject`, as well as the `#filter` method that people from other languages are used to.
- rzzzt 3y agoCan you think of any reasonably popular language where a "filter" operation drops the element if the filtering expression evaluates to true?
- faitswulff 3y agoNo, I can’t. Why do you ask? My point was that it's much nicer to have method names that do what they say instead of the programmatic version of the word "biweekly."
- rzzzt 3y agoGenuine curiosity whether an outlier exists in the "filter" === "include" area.
- eurekin 3y agoIt's based on a real world filter, which actually is a separator. By that analogy anything that sticks to the filter is considered a waste