An Object Is a Bundle of Capabilities

Allen Holub says,

An object is defined by what it can do, not by how it does it.

Never ask an object for information that you need to do something; rather, ask the object that has the information to do the work for you.

[solarview’s comment]
객체에게 물어야 하는 것은 어떤 정보를 가졌느냐가 아니라, 오히려 뭘 해달라고 하는 것이다.
객체가 정보도 갖고, 행위도 갖고 있으나, 행위에 관심을 가지라는 뜻이다.
이것은 어쩌면 과거의 동일한 기능을 가진 함수들을 모아서 모듈화를 꿈꾸었던 것과 별반 다르지 않는듯 보이게 한다. (2/9/08)