3 ms·
Not exactly. For example, in Rust, you can do unions for traits: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=81fb8e831abf5df84944c54
by Zababa 5y ago
Not exactly. For example, in Rust, you can do unions for traits: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=81fb8e831abf5df84944c54c25c562d6 https://play.rust-lang.org/?version=stable&mode=debug&editio.... OCaml has the same system for its objects, where objects are structurally typed.