3 ms·
This viewpoint is exactly why I like Rust. It has syntactic sugar to make things look like traditional objects, but everything is really a bundle of data with a
by jdmichal 10y ago
This viewpoint is exactly why I like Rust. It has syntactic sugar to make things look like traditional objects, but everything is really a bundle of data with a set of associated static functions. (v-tables only appear with trait objects AFAIK, which are uncommon compared to templates.) And tagged unions are built in, with pattern-matching!