J
John Carter
Item 34. Of C++ Coding Standards is "Prefer composition to inheritance".
The objection is inheritance is a very tight coupling between modules.
I would agree with this but expand it in Ruby to...
Prefer composition to inheritance, but if you get the urge to inherit
consider making a mixin instead.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
New Zealand
Carter's Clarification of Murphy's Law.
"Things only ever go right so that they may go more spectacularly wrong later."
From this principle, all of life and physics may be deduced.
The objection is inheritance is a very tight coupling between modules.
I would agree with this but expand it in Ruby to...
Prefer composition to inheritance, but if you get the urge to inherit
consider making a mixin instead.
John Carter Phone : (64)(3) 358 6639
Tait Electronics Fax : (64)(3) 359 4632
PO Box 1645 Christchurch Email : (e-mail address removed)
New Zealand
Carter's Clarification of Murphy's Law.
"Things only ever go right so that they may go more spectacularly wrong later."
From this principle, all of life and physics may be deduced.