Chris Uppal wrote: > >>>It's worth noting, too, that (in some sense) the type of an object can >>>change over time[*]. >> >>No. Since a type expresses invariants, this is precisely what may *not* >>happen. If certain properties of an object may change then the type of >>the object has to reflect that possibility. Otherwise you cannot >>legitimately call it a type. > > Well, it seems to me that you are /assuming/ a notion of what kinds of logic > can be called type (theories), and I don't share your assumptions. No offence > intended.
OK, but can you point me to any literature on type theory that makes a different assumption? > I see no reason, > even in practise, why a static analysis should not be able to see that the set > of acceptable operations (for some definition of acceptable) for some > object/value/variable can be different at different times in the execution. Neither do I. But what is wrong with a mutable reference-to-union type, as I suggested? It expresses this perfectly well. - Andreas -- http://mail.python.org/mailman/listinfo/python-list