You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
OneAnd doesn't seem very useful to me now that Cats has first-class NonemptyList and NonemptyVector types. It can be awkward to work with, especially if you don't have type aliases and "companion" object set up for the type that you are working with.
It keeps its head element separate like a cons-list, making it not very efficient to use with a vector-like structure, but it combines by delegating to an Alternative instance, which isn't efficient for list-like structures.
People might reach for OneAnd when they want a non-empty version of a structure that doesn't have first-class non-empty support in Cats. Some common types that they might reach for are non-empty sets and non-empty maps. However, the OneAnd model doesn't actually work for those (see #1909 for an example).
I'm not sure that OneAnd cuts it as an abstraction, and I don't know anyone who is actually using it. I vote for removing it. Is there anyone who uses it and/or has reason for it to stay?
OneAnd
doesn't seem very useful to me now that Cats has first-classNonemptyList
andNonemptyVector
types. It can be awkward to work with, especially if you don't have type aliases and "companion" object set up for the type that you are working with.It keeps its head element separate like a cons-list, making it not very efficient to use with a vector-like structure, but it
combine
s by delegating to anAlternative
instance, which isn't efficient for list-like structures.People might reach for
OneAnd
when they want a non-empty version of a structure that doesn't have first-class non-empty support in Cats. Some common types that they might reach for are non-empty sets and non-empty maps. However, theOneAnd
model doesn't actually work for those (see #1909 for an example).I'm not sure that
OneAnd
cuts it as an abstraction, and I don't know anyone who is actually using it. I vote for removing it. Is there anyone who uses it and/or has reason for it to stay?Here is a related gitter discussion.
The text was updated successfully, but these errors were encountered: