|
ploots posted:the biggest thing Rust has over C/C++ is cargo and it's not even close This, 1,000,000%. Cargo isn't perfect, but I will never take any new language seriously that doesn't try to nail down early a standard build system at least as good as it.
|
# ¿ Oct 26, 2022 17:12 |
|
|
# ¿ May 13, 2024 08:25 |
|
Nah, I think it's fine. You use dyn if you have a structure or a function whose input/stored type can vary at runtime. Ex. If you want to store a bunch of things that implement a trait, and those things may be of different types, you'd use a Vec<Box<dyn Foo>>. (The Box is required because Vecs store data in a contiguous array, and the sizes of the dyn Foo's may vary.) Music Theory fucked around with this message at 17:58 on Jan 14, 2023 |
# ¿ Jan 14, 2023 17:54 |
|
gonadic io posted:It being nested is a bit annoying. I've made fake little structs like IIRC you can do something like let Some(foo) = bar else { todo!() }; for slightly clearer code than a whole match.
|
# ¿ Oct 6, 2023 16:28 |