|
|
|
|
|
by didibus
3224 days ago
|
|
What you gain by following more constrained constructs is knowing you can't accidentally use it for something else then what you needed it for. Take or. You don't need it to be a language construct, the more general conditionals can do it: if y doX else if z doX. While that's more general and thus more powerful, its less expressive. When you mean or use or, less chance of doing it wrong and the intent is clearer and unambiguous to other readers. Can you define your notation here, I don't follow it. Why do you want a type T * A | T * B ? This I doubt is the real use case, that's already your solution to a use case. Give me a concrete example. |
|