By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,171 Members | 963 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,171 IT Pros & Developers. It's quick & easy.

C++ as OOP language

P: n/a
Why people say that C++ as an OOP language has a tight coupling of type and
function?

Why C++, compared to C, is flexible and handle changes better?
Jul 22 '05 #1
Share this Question
Share on Google+
6 Replies


P: n/a
"BDob" <bd*****@at.att.net> wrote...
Why people say that C++ as an OOP language has a tight coupling of type and function?

Why C++, compared to C, is flexible and handle changes better?


I know, I know! Because it was designed that way. Of course,
there are probably other answers to those questions...
Jul 22 '05 #2

P: n/a
On Wed, 03 Dec 2003 18:17:06 GMT, "BDob" <bd*****@at.att.net> wrote in
comp.lang.c++:
Why people say that C++ as an OOP language has a tight coupling of type and
function?
What people? Who are these people? What are their credentials to
indicate that we should believe what they say?
Why C++, compared to C, is flexible and handle changes better?


The typical large C program has 100,000 lines of code but there is
only a single character in the name of the language, so the ratio is
100,000 lines of code per character.

The typical large C++ program has 150,000 lines of code but there are
three characters in "C++", so the ratio is only 50,000 lines of code
per language name character.

Obviously, with twice as many lined of code per character, C is
stiffer and less flexible.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++ ftp://snurse-l.org/pub/acllc-c++/faq
Jul 22 '05 #3

P: n/a

"Jack Klein" <ja*******@spamcop.net> skrev i en meddelelse
news:v7********************************@4ax.com...
On Wed, 03 Dec 2003 18:17:06 GMT, "BDob" <bd*****@at.att.net> wrote in
comp.lang.c++:
Why people say that C++ as an OOP language has a tight coupling of type and function?


What people? Who are these people? What are their credentials to
indicate that we should believe what they say?
Why C++, compared to C, is flexible and handle changes better?


The typical large C program has 100,000 lines of code but there is
only a single character in the name of the language, so the ratio is
100,000 lines of code per character.

The typical large C++ program has 150,000 lines of code but there are
three characters in "C++", so the ratio is only 50,000 lines of code
per language name character.

Obviously, with twice as many lined of code per character, C is
stiffer and less flexible.


Which is why it is sad it was not called "C-with-classes". ;-)

/Peter
Jul 22 '05 #4

P: n/a
On Thu, 4 Dec 2003 10:57:37 +0100, "Peter Koch Larsen" <pk*@mailme.dk>
wrote:
"Jack Klein" <ja*******@spamcop.net> skrev i en meddelelse
news:v7********************************@4ax.com.. .


[snip]
Obviously, with twice as many lined of code per character, C is
stiffer and less flexible.


Which is why it is sad it was not called "C-with-classes". ;-)


Even if it were, it would still lose out badly to
COBOL-POST-INCREMENTED-BY-ONE.

Sincerelyk,

Gene Wirchenko

Jul 22 '05 #5

P: n/a
Jack Klein <ja*******@spamcop.net> wrote in message news:<v7********************************@4ax.com>. ..
On Wed, 03 Dec 2003 18:17:06 GMT, "BDob" <bd*****@at.att.net> wrote in
comp.lang.c++:
Why people say that C++ as an OOP language has a tight coupling of type and
function?
What people? Who are these people? What are their credentials to
indicate that we should believe what they say?
Why C++, compared to C, is flexible and handle changes better?


maybe those people have just read books on C++ and never programmed in
it ;)
The typical large C program has 100,000 lines of code but there is
only a single character in the name of the language, so the ratio is
100,000 lines of code per character.

The typical large C++ program has 150,000 lines of code but there are
three characters in "C++", so the ratio is only 50,000 lines of code
per language name character.

Obviously, with twice as many lined of code per character, C is
stiffer and less flexible.


haha.... That's a totally weird but clever way to prove that C++ is a
great programming language.
Jul 22 '05 #6

P: n/a
You don't have to implement tight coupling. Define abstract classes
with pure virtual functions and use those to inherit entities.

The followiing articles suggest methods for reducing coupling in C++:

http://www.eventhelix.com/RealtimeMa..._principle.htm

http://www.eventhelix.com/RealtimeMa...dePatterns.htm

Sandeep
--
http://www.EventHelix.com/EventStudio
EventStudio 2.0 - System Architecture Design CASE Tool
Jul 22 '05 #7

This discussion thread is closed

Replies have been disabled for this discussion.