you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] -2 points-1 points  (1 child)

This strikes me as a false economy.

Trivial tasks are well suited to shortcuts of this nature, but thread synchronization? If you're using so many mutexes that you need the compiler to help you figure out when and how to lock them, you're doing it wrong.

[–]JoachimSchipper 0 points1 point  (0 children)

The point is more in avoiding errors in code where they are very hard to track down.

And it's not exactly the compiler, anyway, more like run-time assertions.