3 ms·
>The specific exercise I have in mind is a lockless thread queue. < 20 lines in C .. ~200 lines in Rust. Do they have an equivalent API? Rust does have a hard
by kajaktum 4y ago
>The specific exercise I have in mind is a lockless thread queue. < 20 lines in C .. ~200 lines in Rust.
Do they have an equivalent API? Rust does have a hard time explaining very, very low level stuff that you'd have to do unsafe and various magicks. But once you get the unsafe details right, the consumer API for them tends to be extremely rigid and fool proof.
- jnordwick 4y ago> Rust does have a hard time explaining very, very low level stuff A little odd for a supposed system langauge
- kaba0 4y agoBut it is just not true. Rust has a hard time writing algorithms where objects don’t have a singular owner. That’s all, it is not low level stuff. It for example has proper SIMD support, while the supposedly low level c doesn’t.