Object-oriented programming: Difference between revisions

From XPUB & Lens-Based wiki
(New page: Object-oriented programming is an approach to programming. Many different styles and depths of "OOP" exist, and many languages, including Python support OOP features. In a nutshell, the co...)
 
 
(3 intermediate revisions by the same user not shown)
Line 4: Line 4:
* Inheritance, or a sharing of code & data through hierarchies of "classes"
* Inheritance, or a sharing of code & data through hierarchies of "classes"
* Poly-morphism, or roughly said: the ability for different kinds of objects to respond uniquely to the same message, without the caller of that message needing to know about the differences.
* Poly-morphism, or roughly said: the ability for different kinds of objects to respond uniquely to the same message, without the caller of that message needing to know about the differences.
== Resources ==
* [http://docs.python.org/tutorial/classes.html Python Tutorial on Classes]
** [http://www.python.org/doc/newstyle/ Resources about "new style" python classes]
* [http://en.wikipedia.org/wiki/Object_oriented Wikipedia article on OOP]
* [http://video.google.com/videoplay?docid=-2950949730059754521&ei=oKPISeCIIoKO-Abri-jUAQ&q=object+oriented+programming+smalltalk&hl=en Alan Kay] on objects

Latest revision as of 10:11, 24 March 2009

Object-oriented programming is an approach to programming. Many different styles and depths of "OOP" exist, and many languages, including Python support OOP features. In a nutshell, the core features of OOP are:

  • Bundling or "encapsulation" of data structures and related functions
  • Inheritance, or a sharing of code & data through hierarchies of "classes"
  • Poly-morphism, or roughly said: the ability for different kinds of objects to respond uniquely to the same message, without the caller of that message needing to know about the differences.

Resources