News for hackers. Stuff that matters.
Re:Simplicity Matters By Rich Hickey (Keynote at RailsConf 2... by joske2 on Wednesday May 02, 2012 @03:33AM (#3917965)
I don't understand his point on encapsulation of information versus implementation. If anyone can help me here, I would be grateful.

* Should the user of your object/data have to make this distinction? Does he care if age is a piece of data or the result of a calculation?

* Should the user of your object/data know where a piece of information is? Suppose I start of with having a birthdate attribute in my person hash. I later read something about CQRS and decide to build my person as an event store. My birthdate is now in some event hash inside an events list in person. If I encapsulate this birthdate information, the users of my object/data don't have to change.

Encapsulating information/implementation might "complect" person, but doesn't it make it a lot more simple for the users/callers?

There are no comments on this comment yet.