4 ms·
It depends on the language and it depends on how it's idiomatically used. In theory, you can make capability claims about most languages interchangeably, but th
by Udo 11y ago
It depends on the language and it depends on how it's idiomatically used. In theory, you can make capability claims about most languages interchangeably, but the question is if the language really affords it or not. For example, I would say that Rust's enum gives you a lot of this capability easily, whereas C/C++ usually does not - unions and explicit casting not withstanding. But I do fully acknowledge you could make that claim for almost any language, and be technically correct.
- u320 11y agoSure. I just mean that if you want to have that feature in your language, static typing will not prevent you. In practice almost no mainstream static language does this though.