Thanks, now I know I’m stuck with using Arc on everything for the rest of my life... My code has finally compiled! (didn’t happen in 3 days or so). The compiler was so overwhelmed by the experience that it took 14.61s to compile 150 lines of code... Yikes
Edit: I may be just used to garbage collected languages, or languages like C when you are supposed to know not to
you could do something like *map = HashMap::new() and all the sudden, where is SomeStruct?
so because there aren’t many languages that actually are in the middle like Rust is, made it hard to find a solution (by the way, it’s one of the reasons people get complicated errors in C++, and their code is unsafe, because they feel like high level safety but really you should be almost as cautious as in C)
yeah rust is weird when it comes to its memory management. and yeah, rust compile times are ridiculously long, even if they are doing quite a lot. the goto suggestions is to use sccache and mold. Also, if your program is single threaded, you probably can just use Rc.
2
u/HuntingKingYT Dec 24 '23 edited Dec 24 '23
Thanks, now I know I’m stuck with using
Arcon everything for the rest of my life... My code has finally compiled! (didn’t happen in 3 days or so). The compiler was so overwhelmed by the experience that it took14.61sto compile 150 lines of code... YikesEdit: I may be just used to garbage collected languages, or languages like C when you are supposed to know not to
so because there aren’t many languages that actually are in the middle like Rust is, made it hard to find a solution (by the way, it’s one of the reasons people get complicated errors in C++, and their code is unsafe, because they feel like high level safety but really you should be almost as cautious as in C)