←back to thread

611 points LorenDB | 1 comments | | HN request time: 0.227s | 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 #
sunshowers ◴[] No.43908277[source]
I apologize for the naive question, but that sounds like a heap?
replies(2): >>43908888 #>>43910095 #
jpc0 ◴[] No.43908888[source]
In my experience you need to approach this with vec or arrays of some sort and pass indices around… “We have pointers at home” behaviour. This is fine but coming from C++ it definitely feels weird…
replies(2): >>43908917 #>>43909512 #
1. sunshowers ◴[] No.43909512[source]
I agree in general Rust makes you use arrays and indexes, but heaps are traditionally implemented that way in any language.