Cats: rename Prod / Coproduct to ProductK / CoproductK

Created on 30 Mar 2017  路  6Comments  路  Source: typelevel/cats

The problem is that we already have scala.Product and shapeless.Coproduct and that means it is easy to get the wrong import.

In addition, it is very unfortunate that cats and shapeless (the foundations of this FP stack) should have a name conflict on something so simple.

I understand that the K postfix is appropriate for a higher kinded thing as a workaround until https://github.com/scala/scala/pull/5538 become ubiquitous. I suppose M would also be appropriate?

Binary Breaking Source Breaking Triage needed small

Most helpful comment

I vote for Tuple2K and EitherK, I think they are more accurate than ProductK and CoproductK which have no set arity.

All 6 comments

驴Could they be called TupleK or PairK, and EitherK? That would make it a bit more clear the relation to their 0-Kind counterparts.

I vote for Tuple2K and EitherK, I think they are more accurate than ProductK and CoproductK which have no set arity.

@kailuowang Makes sense to me; should we add a ProductK and CoproductK (or at least just the CoproductK) to avoid fixing an arity?

@edmundnoble sure, if there is need for them. Do you think they should go into 1.0.0-RC1 though? if not maybe we should create another issue for them?

Seems that the opinion we got so far favors renaming to Tuple2K and EitherK. I am going to go ahead creating a PR.

Produkt and Coprodukt :trollface:

Was this page helpful?
0 / 5 - 0 ratings

Related issues

diesalbla picture diesalbla  路  4Comments

kailuowang picture kailuowang  路  3Comments

non picture non  路  3Comments

LukaJCB picture LukaJCB  路  3Comments

chuwy picture chuwy  路  4Comments