3 ms·
new boss who once tried to write a 2-threaded app and got burnt, so from then onward he mandated to never use multiple threads An unfortunate overreaction, I a
by Chris_Newton 4y ago
new boss who once tried to write a 2-threaded app and got burnt, so from then onward he mandated to never use multiple threads
An unfortunate overreaction, I agree.
Does everything have to become dumb to make it safe?
I don’t think trying to avoid shared mutable state is dumb. It’s deliberately choosing a safer default, just like not allowing all references to be null or not accepting the string "123" where an integer like 123 is needed.
Sometimes it can be useful to have shared mutable state, or to make a reference nullable, or to accept different types of data and quietly reinterpret them the same way internally. But these are inherently more dangerous styles of programming — they create opportunities for mistakes that are otherwise systematically prevented — so it seems reasonable to encourage the safer alternatives unless there is a good reason not to use them, and to make the more dangerous choices the ones you have to make explicitly.