[Tutor] Objects C++ vs Python

Walter Prins wprins at gmail.com
Thu Jun 9 12:02:08 CEST 2011


On 9 June 2011 09:48, Alan Gauld <alan.gauld at btinternet.com> wrote:

>
> So does the term *Object * change its meaning when we
>> shift the context from C++ to python?? This is a little confusing,
>>
>
>
> No object is standard in OOP. It is a concept. It is the instantiated
> encapsulation of data and function. How it is created varies between
> language implementations.
>

I'd like to emphasise Alan's point, by adding/pointing out that it is
perfectly possible to write e.g. Object Oriented code in e.g. a procedural
language like C, which obviously doesn't support the notion of objects
explicitly in the language, although then it's up to you to come up with
conventions and infrastructure to support the concept of object orientation
in your program.

As examples, the X Window System was originally written in C but using
object oriented principles, also GTK+ is an object oriented cross platform
widget set written in C.  It relies on a library called GObject for
realisation  of object orientation. See e.g.
http://en.wikipedia.org/wiki/GObject

Regards

Walter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20110609/0e55f9e2/attachment.html>


More information about the Tutor mailing list