Closed whatyouhide closed 3 years ago
Sounds good to me! I am just not sure if :or is the best name. As it can cause confusion with one_of
. Not sure of suggestions though.
@josevalim I know, it should be one_of for this feature and member_of for what today is called one_of 😠Maybe we can call this :alternatives, not sure 😕
I think it is fine to name this or
if we name the one member_of
or in
. Maybe we can deprecate one_of
as in
.
@josevalim I think the clearest options are:
:one_of
:member_of
If that's fine, I propose to:
:one_of
to :member_of
with warning:or
for nowIn the next release, we can rename :or
to :one_of
if we want to, and call it a day. Thoughts?
I would prefer to not do a double renaming. Which is why I went with in/or. In is also a common idiom in Elixir. I think anything starting with one_of will be ambiguous
Okay, lets go with in
and or
🙃
@josevalim ready for another review :)
It's missing docs still, but I think this is a pretty low hanging fruit. Reasons why I'm okay with this:
{:custom, ...}
in my code already ehehThoughts before I write docs? :)