Re:Why Is Object-Oriented Programming Useful? With a Role-Pl...
by Dewie on Wednesday December 03, 2014 @06:20AM
(#8693067)
From what I understand, composition in OO basically means that I put another object as a field in my new object. Is that correct? If so, I don't really see the fundamental difference from doing the same thing with a struct/record: put another struct/record inside another struct. Especially if I can use encapsulation to hide the internal structure of the struct/record.
[ Parent
| on HN ]
There are no comments on this comment yet.