> with the optimization that cases with the same type are unified which is still type safe.

To be clear, this requires explicitly using the same field name as well.