3 ms·
That’s a convenient way of thinking about it. A more logically correct way of thinking about it is: “any” can be any possible type “unknown” is a specific sta
by dclowd9901 4y ago
That’s a convenient way of thinking about it. A more logically correct way of thinking about it is:
“any” can be any possible type
“unknown” is a specific stand-in type. It does not represent all types but is a subset of all types, which allows you to narrow its definition from nothing.
Unknown in practice is closer to a generic in terms of usage and semantics than “any”. It’s like a generic generic except it’s not useful until you direct it. It basically lets you kick the can down the road in your code of having to make a type decision, which is very useful for writing composable and uncoupled code.