News for hackers. Stuff that matters.
Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by derefr on Tuesday January 28, 2020 @04:00PM (#22173969)
> Basically any process in real life you do that involves collaborating with multiple people is a collaborative multi-threaded process.

I would argue that the code equivalent of people collaborating in the real world is multiple processes with IPC (or even further afield, multiple nodes in a distributed system), not threads. You don’t share memory with other human beings. Imagine how productive you could be if you did!

Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by harikb on Tuesday January 28, 2020 @04:22PM (#22174184)
If we read other people’s (say a manager, who is giving work) mind and just did that, we would be in the exact mess we are with shares mutable state.
Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by SeekingMeaning on Tuesday January 28, 2020 @05:30PM (#22174817)
Imagine reading someone else’s mind, only to discover that they are reading yours... Mind-stack overflow?
Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by derefr on Tuesday January 28, 2020 @06:54PM (#22175540)
for certain classes of problems, sure. But how about “embarrassingly parallel” jobs (e.g. weeding a garden) or even “idempotent OLTP” jobs (e.g. studying several subjects at once)?

(Technically these aren’t best expressed as SHM but rather as a tuplespace or greedy worker-pool abstraction, but they can be achieved starting off with “just” an SHM threading primitive, so they count, I think.)

Re:Threads Are a Bad Idea for Most Purposes (1995) [pdf] by nybble41 on Wednesday January 29, 2020 @02:10PM (#22184592)
> You don’t share memory with other human beings.

This really depends on where you draw the boundaries. In a computer everything is "memory" of one kind or another, but that doesn't necessarily correspond to human memory. The analogy works if you think of the "actor" as merely the thread's context and dedicated working space (stack), with everything else being part of the surrounding environment. In the real world we don't have anything akin to process separation, except by convention. Even the body itself can be directly manipulated by others. The convention we use for communication between individuals looks more like a message-passing system, but physical manipulation of matter is more like operating on data in shared memory. There is no physical law preventing someone else from coming along and messing with an object I happen to be holding any more than the rules of a computer prevent one thread from messing with a data object held by another thread.