Friday, December 21, 2007

Encapsulation is not Information Hiding

As food for thought and in reply to Why Encapsulation is a Good Thing it's interesting to take a closer look. What does encapsulation mean exactly, and what can you do with it? Maybe what you really want is Information Hiding? ...and encapsulation is just a way of possibly achieving it? If you are interested in the details/differences, read the article Encapsulation is not Information Hiding.

2 comments:

Rich Moore said...

That's an interesting article. Personally I tend towards the view the wikipedia article on the topic offers: 'one can think of information hiding as being the principle and encapsulation being the technique.'.

dhaumann said...

Hi Richard. That's very true. Encapsulation is a way to realize Information Hiding, but it does not automatically imply it :)