You are viewing a single thread.
View all comments View context
43 points

Your graph also cuts out early. Eventually you want to get performance gains with multi-threading and concurrency, and then the line drops all the way into hell.

permalink
report
parent
reply
17 points

Good Afternoon Sir, have you heard about our lord and savior pthreads?

permalink
report
parent
reply
27 points
*

I’m not saying you can’t do multi-threading or concurrency in C++. The problem is that it’s far too easy to get data races or deadlocks by making subtle syntactical mistakes that the compiler doesn’t catch. pthreads does nothing to help with that.

If you don’t need to share any data across threads then sure, everything is easy, but I’ve never seen such a simple use case in my entire professional career.

All these people talking about “C++ is easy, just don’t use pointers!” must be writing the easiest applications of all time and also producing code that’s so inefficient they’d probably get performance gains by switching to Python.

permalink
report
parent
reply
7 points

That’s the problem of most general-use languages out there, including “safe” ones like Java or Go. They all require manual synchronization for shared mutable state.

permalink
report
parent
reply
4 points

that’s so inefficient they’d probably get performance gains by switching to Python.

Damn, this goes hard for no reason.

permalink
report
parent
reply
1 point

Well, threadsanitizer catches them in runtime. Not sure about GCC static analyser and other SA tools.

permalink
report
parent
reply
1 point

Wasn’t biggest part of pthreads added in C11/C++11?

permalink
report
parent
reply
3 points

So… I’m old. All my time working in C++ was pre-C++11

permalink
report
parent
reply

Programmer Humor

!programmer_humor@programming.dev

Create post

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

  • Keep content in english
  • No advertisements
  • Posts must be related to programming or programmer topics

Community stats

  • 3.2K

    Monthly active users

  • 1K

    Posts

  • 37K

    Comments