3 ms·
> Not because Rust is doing anything wrong here, but because the first well-known language to really get some of these things right also happens to be a fairly
by Starlevel004 1y ago
> Not because Rust is doing anything wrong here, but because the first well-known language to really get some of these things right also happens to be a fairly low-level systems language with manual memory management.
It also has half implementations of all the useful features (no distinct enum variant types, traits only half-exist) because you have to code to the second, hidden language that it actually compiles to.
- whytevuhuni 1y agoYeah, I've hit the enum variant type issue myself (e.g. a function guaranteed to return one of the variants), but in practice it hasn't been that big of an issue. There's also std::mem::discriminant [1] which helps a bit. What do you mean by traits only half-existing? [1] https://doc.rust-lang.org/stable/std/mem/fn.discriminant.html https://doc.rust-lang.org/stable/std/mem/fn.discriminant.htm...