alexvitkov 5 days ago

C++ for one - it has atomics with well defined memory barriers, and guarentees for what happens around them.

The real answer is obviously Assembly - pick a random instruction from any random modern CPU and I'd wager there's a 95% chance it's something you can't express in C at all. If the goal is to model hardware (it's not), it's doing a terrible job.

2
uecker 5 days ago

C has the same atomics and concurrency model as C++.

grandempire 5 days ago

C++ better represents the machine?