4 ms·
I'm finding exactly the same problem with Rust -- I am do exploratory programming in GAP (a Python-like language), then rewriting to Rust once I'm confident I h
by CJefferson 7y ago
I'm finding exactly the same problem with Rust -- I am do exploratory programming in GAP (a Python-like language), then rewriting to Rust once I'm confident I have all the basic data structures and code down. The compile speed of Rust alone is painful.
Also, when converting C++ code to Rust, I find many places where I'm having to de-optimise code to get it past the borrow checker. Large cyclic data structures which are freed as one piece are annoyingly difficult in Rust.
- adamnemecek 7y agoUse vector granphs.
- anewvillager 7y ago> Large cyclic data structures which are freed as one piece are annoyingly difficult in Rust. If you really are deallocating the cyclic structure all at once, just use an arena and represent each element as an indice. Like https://docs.rs/petgraph/0.5.0/petgraph/ https://docs.rs/petgraph/0.5.0/petgraph/ or https://docs.rs/specs/0.15.1/specs/ https://docs.rs/specs/0.15.1/specs/
- _pmf_ 7y agoJon Blow addresses this in some earlier rant here: https://www.youtube.com/watch?v=4t1K66dMhWk https://www.youtube.com/watch?v=4t1K66dMhWk His point being that now you're effectively implementing a form of manual memory management to circumvent the borrow checker.