Adding Xavier's explanation to the documentation would be of great
help, and easier to spot if they are contained in its own section.

On Thu, 21 Jan 2021 14:28:00 +0000
Mário Guimarães <[email protected]> wrote:

> I totally agree with Xavier.
> 
> A qui, 21/01/2021, 13:33, Xavier Noria <[email protected]> escreveu:
> 
> > To me, this is like adding an option to any? Let's imagine:
> > any?(enum, on_empty: true).
> >
> > You'd say, man, how can you special-case the enum like that, the
> > predicate is about finding some element! If there is no element,
> > then, the result should be false. If you need contextual logic
> > about the emptiness of the collection, write it next to the
> > predicate.
> >
> > Same for all?(enum, on_empty: false). How can all? return false for
> > an empty collection? It does not make sense! If there are no
> > elements, all? should be true! It is the same argument argued above
> > for any? It's equally off for me.
> >
> > In my view, if you need logic about the emptiness, you write it
> > apart, do not mix it.
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "elixir-lang-core" group.
> > To unsubscribe from this group and stop receiving emails from it,
> > send an email to [email protected].
> > To view this discussion on the web visit
> > https://groups.google.com/d/msgid/elixir-lang-core/CAM%3DYcdi_Hb2%2BwDWgLuC_Dqe7XwgaiuBVzC%2BSXC07wkuGJwy9ZQ%40mail.gmail.com
> > <https://groups.google.com/d/msgid/elixir-lang-core/CAM%3DYcdi_Hb2%2BwDWgLuC_Dqe7XwgaiuBVzC%2BSXC07wkuGJwy9ZQ%40mail.gmail.com?utm_medium=email&utm_source=footer>
> > .
> >
> 

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/6009905c.1c69fb81.37a8e.efc9SMTPIN_ADDED_MISSING%40gmr-mx.google.com.

Reply via email to