Hacker News new | past | comments | ask | show | jobs | submit login

for stuff like gaming & HFT, you are probably forced to do it in C++, it is a sad reality affecting small % of developers. for everything else, if you are still building fresh new projects in C++, you are making a big mistake.

C++ today is like Cobol in 2010. yes, there are reasons for them to exist, people tell your the good old days, probably some fresh good recent experience. but come on, there is a much better place for C++ -

https://computerhistory.org/




Why is gaming and HFT forced to be C++? Just that code already exists in C++ and you need to expand on it?

Gaming has Unreal but surely you could use another game engine without C++?


Simply put cpp gives you ultimate control. If you want to be absolutely economical with the CPU/memory, you need to do things likely preallocate memory and making sure you don't get cache misses and branch mispredicts.

For most software, the hardware has already run away to the point where you can just sort of tell the machine roughly what to do and it will do it for you in a way that doesn't affect your task, so you don't have to fiddle with minutiae like where exactly to place a thing in memory.


So Rust can’t do that quite as well?


I think it gets close. Certainly close enough that if you're a small team doing similar things, use Rust. If you have time to fiddle with the little things, go with cpp.


Rust doesn't even have support for custom allocators in the language/stdlib. Still waiting on https://github.com/rust-lang/rust/issues/42774.

bumpalo doesn't cut it. Funny thing is that boring and sensible Go just came out with arenas support.


As mentioned below we are doing audio plugins. Every cycle is precious to our artists. Especially since we are doing spectral effects.


I do precise timing with accuracy up to +/- 1ns and some of my hardware are of 10-100pt resolution.

I use C and Rust for such serious stuff as I don't have free time to waste to just entertain those over designed concepts like OO or STL. you need to be honest - the stdlib of C++ is not on par with the ones in rust or golang. It is more like stone age tools compared with starlink.

I sincerely hope that all C++ users will be able to benefit from the networking addition to the C++ stdlib before their retirement - you know after 40 years waiting not all C++ developers had such pleasure.


> more like stone age tools compared with starlink

that would the starlink whose performance slowly, inexorably degrades as more and more of my neighbors start to use it?




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: