3 ms·
> most programmers are already accustomed to multithreaded programming using shared memory Aren't most programmers JavaScript programmers accustomed to single
by naikrovek 8y ago
> most programmers are already accustomed to multithreaded programming using shared memory
Aren't most programmers JavaScript programmers accustomed to single threaded applications passing variables around?
I've been programming for 20 years, as a career, and I've never once used shared memory in the way that I think when I think "shared memory". Maybe some languages I've used do things internally with shared memory, I don't know.
My point here is to be aware that the people you work with and know aren't necessarily representative of "most programmers" even though it feels that way to each of us. We expose ourselves to what we know more than what we don't know, and that influences how we each see the world.
- atombender 8y agoYou've never needed to share a cache (like a map of ID -> object) across threads? Or implement a queue for distributing work to threaded workers? Or maintain a shared rate limiter across threads, to prevent saturation of some API or other shared resource? Those are all shared memory examples. Avoiding sharing memory for concurrent workers is rare, in my experience, unless the workers are completely isolated -- which they rarely are. You can move some things outside (for example, Redis as a cache), at the expense of performance or simplicity.
- c61 8y ago> My point here is to be aware that the people you work with and know aren't necessarily representative of "most programmers" even though it feels that way to each of us. Definitely a good point and something we all should keep in mind. With that being said: > Aren't most programmers JavaScript programmers I would say no. Outside of Silicon Valley, most programmers are employed working on internal enterprise applications using backend languages like Java, C#, Ruby, and Python. Shared memory is the standard way multithreaded programming is done is all these languages. It is also the standard way multithreaded programming is done in C and C++ and therefore most of the serious software out there. I think this definitely covers "most programmers," or at least most application developers, the subset of programmers most likely to try to learn Go.