-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple things are prefixed withBi-
meaning different things.
#1297
Comments
In shapeless I've adopted the convention of using 1, 2, 3 etc. suffixes to convey kinds |
What would functions like |
We are currently using val fa: F[A] = ...
val fb: F[B] = ...
def fn(a: A, b: B): C = ...
(fa, fb).map2 { case (a, b) => fn(a, b) } That said, I'm fine with using numeric suffixes. We might need to using different names for these methods, or for the cartesian builders, but that's OK. I'm not sure we'll ever need to support 3+ here (and a |
@a-reisberg Said that |
Tri-algebras, as @sellout mentioned right before my rephrase (sorry, I don't know how to make a link...), essentially live in higher categories, so I don't think we have any use for them (at least for a while? :) ). At the same time though, I want to chime in that I do like the suffice |
So if people are in favour of the numeric suffices I can put together a PR with the changes. |
@mgttlinger This sounds like the way to go. Thanks! Do people think it's worth providing compatibility aliases for things like |
PR: #1334 |
How should the |
I chose |
Namely
|
It seems to me that the name |
I am by now strongly in favour of keeping |
@mgttlinger I just saw this on the bifunctor entry on nLab:
So CS people stuck with a term that is already out of fashion in math (probably for good reasons.) I don't have a strong opinion over what we shall do about it in cats. I agree with you that rename |
How viable would it be to have those things named with numeric suffices but have a type alias as |
That might be a good idea. |
The only downside I see is that if one day we need the aliased name for something it would become odd. |
Depending on what we end up doing, we might have to come up with a new name for |
Maybe we could rename |
Yesterday I was able to clarify how the name Bifunctor makes sense. The bi- prefix on things like bimonads, bialgebras etc is a different bi- prefix than the one on the bi-functor. The later is similar to the bi- on bilinear operations. |
Closing this one for inactivity. (Also it's too late to change anything like that now.) |
We have a
Bimonad
where the prefix means that it is aMonad
and aComonad
. We also have things likeBifunctor
,Bifoldable
andBitraverse
where the prefix expresses that it is about types with two type parameters instead of one.In #30 this has been brought up already and it was suggested to rename
Bimonad
toDualMonad
orSelfDualMonad
by @fthomas and @non.DualedMonad
was also suggested. On gitter the discussion was revived recently and I suggested keepingBimonad
as nlab agrees with the naming (https://ncatlab.org/nlab/show/Hopf+monad)I suggested to rename the other interfaces to a
Bin-
prefix to denote that their type constructors are binary but that would raise the issue again once we want interfaces for types with three parameters. @tpolecat suggested to change them toFunctor2
,Functor3
, ... which would leave those options open for the future and should be familiar to a Scala programmer given that e.g. theFunction
types use the same "convention"The text was updated successfully, but these errors were encountered: