and std::vector is even more type safe, but even less useful.
I think the term "type safe" having the word "safe" in it was created by it's supporters, it's as biased as a term as "strongly typed".
If some code is getting an object then that code already knows why it is requesting that object and what it will do with the object, what methods it would make sense to call on the object, what methods might not be available and the such.
If there were no recursive functions, or objects, no flow control like "for" or "while" available, nothing like a code type either that would allow you to abstract a loop, then your program would be guaranteed "loop safe" and "lockup safe".
Maybe there should be a fixed number of types, like in the original C with no objects, then it would be totally safe.
> Variant seems functionally inferior to Any, the big'y being that you need to know all the types in advance.It's not inferior but superior, as it allows type-safety.