4 ms·
I've seen a guy change some code for shaders, go into another tab and that tab already had the new changes after the compile. If you can do this in C++, then su
by iopq 10y ago
I've seen a guy change some code for shaders, go into another tab and that tab already had the new changes after the compile. If you can do this in C++, then surely you can do stuff like this for Rust.
You can certainly have a hash map of trait objects in Rust (it just points to the vtable and the data). This means anything that has an impl for the Trait can be stored in the hash map.
Rust also doesn't have exceptions, using algebraic data types to hold on to the errors and return them up the stack. Because it's on the stack, it's not some global state that's mutated, but we just went back to the calling function and we can attempt to try again.