programaker / Joguin2

Toy Scala project to study some cool Functional Programming concepts (version 1 was in Java)
2 stars 0 forks source link

Replace the home-made Tag[A, B] class with cats Const[A, B] #10

Closed programaker closed 5 years ago

programaker commented 5 years ago

It seems that Const can do exactly what our Tag is doing - a phantom type that helps disambiguate implicits of the same type.

programaker commented 5 years ago

Rejected.

We will still need the Phantom types themselves (T1, T2, ...) and the function which helps to create the Arbitrary tagged value. Not much to gain