What exactly does
cast do? My understanding is that a variable has a type, which indicates what type object it may be bound to. And of course object’s have type. Does
cast alter the type of a variable or the type of an object? Or does it do something else?
Looking at the docs for safe cast, it looks like
cast is side-effecting…
Does cast have anything to do with type unification?
When would you need to
cast? I don’t mean in order to subvert the type system — I just mean, during regular use, when would you come upon the need to cast?