Colleen Pridemore

Searle's quote about StrongAi really tugged at my lifeline.

How did StrongAi tug at your lifeline?


Composition vs. Inheritance in OOP -- Which is more natural?

Why re-invent the wheel? Copying seems to be very natural. In programming, we tend to use "copy & paste" functions quite a bit when writing code. However, in our physical dimension, complex systems in nature do not only copy, but use integrated inheritance.

Consider a tree. Trees are fractals; the entire picture of a tree is mirrored in each of it's branches. Being a fractal, a tree has a higher functioning capability than say, a blade of grass - which is not a fractal.

Trees have many functions like producing oxygen for the earth's atmosphere, providing shade, food and wood. A good example of higher functions would be the tree's leaves, which drop to the ground and fertilize the earth, which in turn, fertilizes the plants surrounding the tree which nourishes another larger system; the earth.

To further the example, consider the universe itself. Planets are roughly spherical in shape as are their orbits. Black holes are spherical or spiral in shape as well. If inheritance were not happening, there would just be little copies of separate things everywhere instead of matter working on an integrated level.

This means the microcosm is inheriting the state or function of, the macrocosm.

All this inter-relatedness of natural systems implies inheritance rather than separate composition of each element. Inheritance, rather than composition is clearly a more natural programming style to be used in Object Oriented Programming. --ColleenPridemore


Here's a little about me: http://hypoetic.blogspot.com. -- ColleenPridemore


Welcome to Wiki.

Thanks for the warm reception! I've placed myself in the MinoritiesOnWiki. -- ColleenPridemore


CategoryHomePage


EditText of this page (last edited June 29, 2010) or FindPage with title or text search