LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-06-2004, 01:33 PM   #16
rustynailz
Member
 
Registered: Jun 2004
Distribution: MDK 9.2/10.0, VectorLinux 4.0
Posts: 50

Rep: Reputation: 15

C++ beats C hands down for most large projects - except when it comes to performance issues. Obviously the mechanisms in C++ are bloated when compared to the raw efficiency of C.

However, comparing structs and classes just isn't right. And while you may be able to emulate some aspects of OOP in C, you can't do it all. I'll also agree (as it's been said here lots before) that there are other younger OOP languages that are much easier to get into.

I think C is more suited to programming, and C++ more suited to software engineering.
 
Old 12-07-2004, 02:42 AM   #17
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
Quote:
Originally posted by Harishankar You can write C programs in C++. Therefore there is no such thing as moving away from C.
C is C++' biggest enemy! This "feature" is what makes C++ unreliable when used by beginners.

Back to the subject. I've read somewhere, that there are difference of interpretation issues with some points of the C++ specification, that make the C++ language less portable than C, accross different hardware and software. Remember that Linux is NOT only for x86, and many programs often are not only for Linux, but also for *BSD, and even other Unixes.

Yves.
 
Old 12-07-2004, 02:55 AM   #18
shy
Member
 
Registered: Dec 2002
Location: Russia
Distribution: ASP linux
Posts: 94

Rep: Reputation: 15
Do you mean it's hard to write a correct C++ compiler?
 
Old 12-07-2004, 03:00 AM   #19
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
No. I mean that some people disagree on how a "correct" C++ compiler should behave. Or so I've read...

Yves.
 
Old 12-07-2004, 03:09 AM   #20
shy
Member
 
Registered: Dec 2002
Location: Russia
Distribution: ASP linux
Posts: 94

Rep: Reputation: 15
Does it mean that different C++ compilers behave differently depending on what their authors think as "correct"? Then, what's the difference with C compilers, which differ from each other too? Or you are saying that differences in C++ compilers are more noticeable?

Couldn't you try to refresh your memory and post a link? It would be interesting to know these drawbacks of C++ compilers in detail.

Last edited by shy; 12-07-2004 at 03:12 AM.
 
Old 12-07-2004, 07:39 AM   #21
theYinYeti
Senior Member
 
Registered: Jul 2004
Location: France
Distribution: Arch Linux
Posts: 1,897

Rep: Reputation: 66
That's what I mean.
Differences in C compilers mostly relate to optimisation.
Differences in C++ compilers may have to do with their support of some features, or with the meaning they give to given lines of source code.

I cannot refresh my memory, but in case you have doubts, google quickly gave me:
http://www.mozilla.org/hacking/portable-cpp.html
http://www.boost.org/more/borland_cpp.html
...

Yves.
 
Old 12-07-2004, 09:13 AM   #22
jtshaw
Senior Member
 
Registered: Nov 2000
Location: Seattle, WA USA
Distribution: Ubuntu @ Home, RHEL @ Work
Posts: 3,892
Blog Entries: 1

Rep: Reputation: 67
Not to mention that fundamental changes happened which broke compatibility multiple times between 2.95 and 3.3.x versions of GCC when it comes to C++ code and the ABI. Hopefully things will be a bit more solid from now on so we won't have to port code from one version of GCC to another.

Last edited by jtshaw; 12-07-2004 at 11:50 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot using FTP move command to move files adrianmak Linux - Networking 4 04-21-2009 12:01 PM
Mandrake Move 2.0 ronan180989 Mandriva 1 02-15-2005 06:20 AM
mandrake move ADCOOL Linux - Wireless Networking 1 12-07-2004 02:22 AM
Should I Really Move?? operator87 Linux - Software 5 09-13-2004 01:27 PM
Should I move on?? New2Lindows Linux - Distributions 14 08-15-2003 01:58 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 08:09 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration