> It'd be fun to show stuff like "here's a complete multi-threaded queue > implementation" vs the equivalent C code. Especially for real C code and all > the scaffolding it ends up with.
There won't be any difference because you need to use manual memory management in both. Well, with Nim you can avoid type-erasure if you want a generic queue but that's all. Nim MPSC batch queue: <https://github.com/mratsim/weave/blob/71dc2d7/weave/cross_thread_com/channels_mpsc_unbounded_batch.nim> C++ (but with lots of comment to ensure I was reimplementing it right for model checking/formal verification): <https://github.com/mratsim/weave/blob/71dc2d7/formal_verification/mpsc_batch.cpp>