Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Alan Gauld
"Ashwini Oruganti" wrote Didn't know that! It's interesting that GObject is itself written in C, which is a procedural laguage.. The original implementation of C++ was called cfront which was a preprocessor which converted C++ code into vanilla C ready for compilation. (Actually there was

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Corey Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/09/2011 07:03 AM, Ashwini Oruganti wrote: > On Thu, Jun 9, 2011 at 3:32 PM, Walter Prins wrote: > >> Object Oriented code in e.g. a procedural language like C, which obviously >> doesn't support the notion of objects explicitly in the language,

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Izz ad-Din Ruhulessin
Compared to Python, I do not even consider C++ an object oriƫnted language. 2011/6/9 Ashwini Oruganti > On Thu, Jun 9, 2011 at 2:18 PM, Alan Gauld wrote: > > C++ grew out of C so it has a lot of non OOP features. It is no >> surprise to find therefore that its primitive types are related to >> m

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Ashwini Oruganti
On Thu, Jun 9, 2011 at 2:18 PM, Alan Gauld wrote: C++ grew out of C so it has a lot of non OOP features. It is no > surprise to find therefore that its primitive types are related to > memory allocation and raw data rather than objects. > > No object is standard in OOP. It is a concept. It is t

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Walter Prins
On 9 June 2011 09:48, Alan Gauld 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 cr

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Alan Gauld
"Ashwini Oruganti" wrote I'm trying to learn Python, and know C++. I have a slight confusion regarding the meaning of "object" in python. Here's what I've concluded so far: When we say "object" in C++, it means an instance of a class. No, although its a common misconception. An object in O

Re: [Tutor] Objects C++ vs Python

2011-06-09 Thread Steve Willoughby
On 08-Jun-11 23:33, Ashwini Oruganti wrote: On Thu, Jun 9, 2011 at 11:31 AM, Steve Willoughby mailto:st...@alchemy.com>> wrote: The value 5 is an integer-class object. But now what is "Integer-class"? Isn't integer a data type? I mean there is no concept of "classes" in C, and yet in C, we

Re: [Tutor] Objects C++ vs Python

2011-06-08 Thread Ashwini Oruganti
That clears it up to an extent. On Thu, Jun 9, 2011 at 11:31 AM, Steve Willoughby wrote: > The value 5 is an integer-class object. But now what is "Integer-class"? Isn't integer a data type? I mean there is no concept of "classes" in C, and yet in C, we can write int x = 5; Will "5", then be

Re: [Tutor] Objects C++ vs Python

2011-06-08 Thread Steve Willoughby
On 08-Jun-11 22:38, Ashwini Oruganti wrote: I'm trying to learn Python, and know C++. I have a slight confusion regarding the meaning of "object" in python. Here's what I've concluded so far: When we say "object" in C++, it means an instance of a class. e.g. This is true in both Python and C++

[Tutor] Objects C++ vs Python

2011-06-08 Thread Ashwini Oruganti
I'm trying to learn Python, and know C++. I have a slight confusion regarding the meaning of "object" in python. Here's what I've concluded so far: When we say "object" in C++, it means an instance of a class. e.g. class x{...}; x ob1; // here ob1 is an object. but, for; int