Phantom types to encode state in C#
You cannot add or remove method from generic interface based on the type. Also, CLR doesn’t support higher kinded types (as of now). Let’s say that we want to encode state of an object in its type and disallow some operations depending on the state. In our example we will use issue. We can assign … Continue reading Phantom types to encode state in C#