>>37
By contrast run-time objects in Haskell have no type at all. They are just bits being flung around.
OK, first, how does this work?
f :: Either String Int -> String
f x = case x of
(Left s) -> "Got string " ++ s
(Right i) -> "Got int " ++ show i
main = do
putStrLn (f (Left "123"))
putStrLn (f (Right 456))
In particular, I'm very interested in hearing your explanation of how the function `f` decides to do one or the other thing given a value (Left "123") through its argument x without mentioning the type of the value itself (as opposed to the type of the argument x, which is `Either Int String`).
Second,
everything is just bits flying around, in every language. A statement that some particular sequence of bits has so and so type is what
we say, outside the machine. By way of an analogy, you can't express "statement x is true" in first order logic, obviously that doesn't prevent statements of first order logic from being true or false.
However, sufficiently expressive languages allow the runtime type of a value to be different from the static type of the expression producing that value (such as a parameter 'x'), so must necessarily include some of the runtime type information explicitly, as some bits that say how to interpret other bits, that say that Animal::Voice() when applied to a value of type Dog produces a string "Woof".