News for hackers. Stuff that matters.
Re:Coding Skill and the Decline of Stagnation by figglesonrails on Friday January 13, 2012 @04:07PM (#3462406)
Cool story, bro.

(Mime aside, do we get to hear what the argument was?)

Re:Coding Skill and the Decline of Stagnation by pigs on Friday January 13, 2012 @04:55PM (#3462568)
The crux of the argument (and most of the book for that matter) is that you want to avoid mutability whenever possible. Adding setters for every field by default means mutability is the default mode for your application. Adding getters for every field by default means you lose any advantages of encapsulation. At one time, Java Beans were a heavily marketed pattern by Sun. Joshua Bloch came along and said "hey, this is a bad pattern" (and maybe others, but he's the one I always think of).
Re:Coding Skill and the Decline of Stagnation by jiggy2011 on Friday January 13, 2012 @05:35PM (#3462698)
Why does everything have a getter/setter by default? That is a pretty horrible anti-pattern, is it something to do with being able to serialise the state (including internal state) of the whole object?
Re:Coding Skill and the Decline of Stagnation by hackinthebochs on Friday January 13, 2012 @09:30PM (#3463302)
It's about hiding implementation. If you access an object only through methods then the implementation can change without the client code having to know or care (aka be recompiled)