And I'm not talking about "auto"; I'm talking about std::any where a datum is stored together with a type tag in a fat pointer that preserves the type information at runtime which can be queried.
Yeah it turns out you can simulate dynamic typing in static typing in terms of just making every expression the same type to some kind of struct which stores the type info in a field.
That's pretty much what all those implementations that compile a dynamic language to C do; they define something like a struct called SchemeObj and have a field for the type tag and pass that around everywhere.
0
u/[deleted] Jun 28 '18
[deleted]