Is there a language with something like the following construct?
var_type(TYPE_1, TYPE_2,..., TYPE_N) obj;
and now its possible to:
TYPE_17 staticTypeVariable17; obj = staticTypeVariable17; TYPE_3 staticTypeVariable3; obj = staticTypeVariable3;
obj being a pointer of some base class and with no need for casting if the types used are from the predefined set.
So basically an object that can switch it's type amongst a predefined set of types.