# The filter function is non-intuitive

**URL:** <https://discourse.julialang.org/t/the-filter-function-is-non-intuitive/45674>\
**Category:** Internals & Design\
**Created:** [August 28, 2020, 10:46am UTC](https://discourse.julialang.org/t/the-filter-function-is-non-intuitive/45674 "2020-08-28T10:46:47Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [August 28, 2020, 11:19am UTC](https://discourse.julialang.org/t/the-filter-function-is-non-intuitive/45674/4 "2020-08-28T11:19:14Z")

</div>

> [@TheLateKronos](#):
>
> So my problem with it is the fact that a filter removes, by definition.

Not really. A filter usually _separates_ something into two parts. It is up to the user to decide what is kept (could be both, just needed to be separate). Eg an [aggregate grading sieve](https://en.wikipedia.org/wiki/Sieve_analysis) would keep _all_ parts, all of which are needed for the analysis.

The lesson is that one should not rely on intuition for these things — just read the docs if you are unsure.

> [@TheLateKronos](#):
>
> it is even a point to discuss this?

Probably not, see

> [@PSA: Julia is not at that stage of development anymore](https://discourse.julialang.org/t/psa-julia-is-not-at-that-stage-of-development-anymore/44872):
>
> You heard about this brand new exciting programming language called Julia and have some suggestions for how it should work. Wonderful! We’re happy to have you here and help you learn the language and listen to your ideas! However, please be aware that “new” is a relative term. Yes, Julia is newer than, say, C, which was first created in 1972 and standardized in 1989. It is not, however, new in the sense that it is still being freely designed and changed in arbitrary ways. Julia development start…

---

_[View the full topic](https://discourse.julialang.org/t/the-filter-function-is-non-intuitive/45674)._
