News for hackers. Stuff that matters.
Re:Bartosz Milewski - The Downfall of Imperative Programming by j_baker on Tuesday April 10, 2012 @02:16PM (#3823576)
I'm sorry, but I simply have no idea what you're talking about. I'm sure it's just me being an idiot, but I'm lost whenever we talk about "composition of sequential software with disjoint data". Could you explain this to me like I'm an 8-year-old?
Re:Bartosz Milewski - The Downfall of Imperative Programming by NathanRice on Tuesday April 10, 2012 @03:56PM (#3824076)
Sorry, I'm a math person, I use math terms out of habit :)

Your initial statement was that if you take a single threaded program and run multiple instances of it in a single process (composition of sequential software), concurrency issues appear even for programmers working on sequential processes. I wanted to clarify that this is only the case when variables that are modified as part of execution are shared between them. If no variables modified as part of program execution are shared, this is equivalent to saying the data of the programs are disjoint.

To get down to web-level nitty gritty: If you modify global or module level variables, you will run into trouble. If you keep variable that will be modified in a scope specific to the request you are currently handling, and persist objects using an information store designed for concurrency, you will be fine. Avoiding mutable global variables and using specialized data stores have been best practices in coding for a long time.