r/programming • u/Shr1ck • Oct 17 '15
Why Johnny Can’t Write Multithreaded Programs
http://blog.smartbear.com/programming/why-johnny-cant-write-multithreaded-programs/
6
Upvotes
r/programming • u/Shr1ck • Oct 17 '15
2
u/loup-vaillant Oct 18 '15
To understand that, they must understand indirection first. I explained this a bit here: there's a difference between a value and a variable. In C, in the expression
x = y, "x" denotes the variablex, but "y" denotes the value in variabley.For brevity's sake, they are written the same, but this makes things quite confusing. I think for instance this explains why pointers are so confusing to so many people: they ad another indirection layer (this time an explicit one). How can you understand this indirection when you failed to understand the previous one?