←back to thread

611 points LorenDB | 1 comments | | HN request time: 0.369s | source
Show context
atemerev ◴[] No.43908259[source]
Right. I attempted using Rust for trading-related code as well. However, I failed to write a dynamically linked always sorted order book where you can splice orders in the middle. It is just too dynamic for Rust. Borrow checker killed me.

And don't get me started on dynamic graphs.

I would happily use Rust over C++ if it had all other improvements but similar memory management. I am completely unproductive with Rust model.

replies(4): >>43908277 #>>43908709 #>>43909131 #>>43909428 #
kelnos ◴[] No.43909428[source]
The nice thing is that you can always drop down to unsafe and use raw pointers if your data structure is truly not suited to Rust's ownership rules.

And while unsafe Rust does have some gotchas that vanilla modern C++ does not, I would much rather have a 99% memory-safe code base in Rust than a 100% "who knows" code base in C++.

replies(1): >>43910042 #
1. atemerev ◴[] No.43910042[source]
I have read the "too many linked lists" story and I think the other commenters here are right; the less pointers the better. Even with unsafe, there's just too much ceremony.