Composition vs. Deriviation in Gtkmm
- From: kenton wilson gmail com
- To: gtkmm-list gnome org
- Subject: Composition vs. Deriviation in Gtkmm
- Date: Wed, 07 Nov 2012 13:34:35 -0600
Hello All,
In the Gtkmm tutorial (http://developer.gnome.org/gtkmm-tutorial/2.24)
many of the examples are implemented by having the user defined
example class derive from a Gtkmm class. Most likely many (if not
all), of these examples could of been implemented by using some form
of composition instead of derivation. As you all know, in C++,
composition is generally preferred over derivation. Which leads me to
ask, in the context of Gtkmm, is there a rationale for preferring
derivation over composition (or vice-versa). What are the pros and
cons of each approach in implementing your UI using Gtkmm?
TIA,
Kenton
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]