2 ms·
These features may be used to program in a more OO style without the notion of classes. For example, one case use the embedding of fields to have a similar effe
by coliveira 16y ago
These features may be used to program in a more OO style without the notion of classes. For example, one case use the embedding of fields to have a similar effect to inheritance.
Similarly, one can pass pointers to objects that contain a type as if it was the type itself, which is the same thing that inheritance allows. Of course, here there is no difference between containment and inheritance, you can use it as you desire.