3 ms·
Is effectful code ever easy to understand? (The answer is yes, because it often follows expectations. This is why dynamically-typed languages work. Although
by jrockway 17y ago
Is effectful code ever easy to understand?
(The answer is yes, because it often follows expectations. This is why dynamically-typed languages work. Although there is no explicit structure, you can generally see what type the author wants something to be by understanding what the code is trying to do. With imperative programming, the same is true. The "+" function probably doesn't depend on your fooBarBaz global variable, so you can pretend it doesn't. But there is no guarantee -- and programming based on guarantees is safer than programming based on hoping the author is doing what you think he's doing.)