Arquivo de 22 de Maio de 2008
State: you’re doing it wrong
I’m completely convinced that mutable objects and the whole approach that is sort of implied by the design of Java, C#, Python, all the languages that followed along this path, is very much the wrong way to do most things… it is ok to do somethings, but it’s the wrong way to do most things.
Mutable objects are the new spaghetti code, and by that I mean that you eventually, with mutable objects, create an intractable mess, and encapsulation does not get rid off that, encapsulation just means: well, I’m in charge of this mess. But the real mess comes from this network you create of objects that can change, and your inability to look at the state of a system and understand how you got there, how to get there to test it next time… so it’s hard to understand the program… it’s very hard to test it. I think that’s interesting in telling all the emphasis on test driven design. I think people are driven to this because they know their systems are completely intractable…
Rich Hickey - Screencast: Clojure Concurrency (”transcrição” do minuto 21 ao 23)