[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]random question
From: |
CH Gowri Kumar |
Subject: |
Re: [DotGNU]random question |
Date: |
Sat, 8 Feb 2003 01:16:39 +0530 (India Standard Time) |
> Hmm... right now it makes lots of sense to use C because the rest of the
> framework is in C :)
Ofcourse.
But why was C used in instead of C++, when we are
trying to simulate the same through user level programming.
To be more precise by what I mean simulating, this is what I have
observed(may be wrong)
In C++
Class class{
//...
Data members
//....
Function Members
}
In C:
typedef struct class{
//..
Data Members
//...
Function Pointers (to the function members)
}class;
And then we have an initalize function which does the assigning of the
function pointers to the appropriate functions.
class c;
Initialize(&c);
After that it to call member functions:
c->MemberFunction(&c,..)...
> Every single bit of OO you add increases size , complexity and speed
> penalties to the system. This idea is almost identical to OO , but
> without inheritance or constructors or base classes. Which is to say
> "virtually no overhead" :).
This is the reason hear from a lot of people.(I have also quoted the same
in the question which i posed in the firstmail).
But just wanted to know what is the increase in overhead between the
implementations of C and C++.
By way of simulating we are incurring the pointer indirection everytime.
Also all the structure elements have function pointers increasing the size.
And debugging becomes **difficult** with function pointers.
Just curious to know the reason :)
Regards,
Gowri Kumar
- [DotGNU]cscc symbol table and random question, CH Gowri Kumar, 2003/02/07
- Re: [DotGNU]cscc symbol table and random question, Gopal V, 2003/02/07
- Re: [DotGNU]cscc symbol table and random question, CH Gowri Kumar, 2003/02/07
- Re: [DotGNU]cscc symbol table and random question, Gopal V, 2003/02/07
- Re: [DotGNU]random question,
CH Gowri Kumar <=
- RE: [DotGNU]random question, Aditya P. Bansod, 2003/02/07
- Re: [DotGNU]random question, j_post, 2003/02/07
- RE: [DotGNU]random question, Thong \(Tum\) Nguyen, 2003/02/07
- Re: [DotGNU]random question, j_post, 2003/02/08
- RE: [DotGNU]random question, Thong \(Tum\) Nguyen, 2003/02/08
- Re: [DotGNU]random question, j_post, 2003/02/08
- Re: [DotGNU]random question, Gopal V, 2003/02/08
- RE: [DotGNU]random question, Thong \(Tum\) Nguyen, 2003/02/08
- Re: [DotGNU]random question, minddog, 2003/02/08
- Re: [DotGNU]random question, Rhys Weatherley, 2003/02/07