Advertisement

C or C++?

Started by April 11, 2001 02:38 PM
75 comments, last by Chronoslade 23 years, 10 months ago
null_pointer: C doesn''t have all that bloat you just mentioned.
What bloat?
Advertisement
C++ is good for large programs that don''t have small speed/ram requirements, like office suites. It''s almost impossible to write major programs in C without some form of organization, and C++ is good for those. C is more "down to it" and a good jumping point if you want to learn asm.
C++ is slightly closer to the hardware, and it is a better procedural language than C. These are simple statements of fact, not personal opinion.

Which language features you use to write your software depends on your goals and the individual problems you must solve within the software. That is true for any language. C++ programs do not necessarily carry any more overhead than C programs.

As evidenced by mafried''s flamebait, there are no language features that justify C as a better language. The one thing that C has which C++ doesn''t have that might be used to justify C as a better language is its simplicity. What many C programmers don''t realize is that they spend time crafting and adopting bad habits like notation to compensate for the features that C lacks. It is my opinion that the code obfuscation these habits inevitably cause outweighs the simplicity of C and makes it a worse language than C++ for any kind of software development.

Remember that it is your decision, and your responsibility. If you decide to use C++, please take the time to learn it before passing judgement on it.
I code in c simply because I know c pretty well. It is simple and clean. I don''t hate c++ and I will probably change to c++ soon but for the moment I feel more comfortable with c. I have programmed in c++ a few years ago (my second language after pascal) but I think it takes a little while to learn all the important features of c++ and right now I feel like I rather do some coding instead of learning those but guess that will change in less than a year. I already now think c++ has some really good features I want but as I said, I''ll wait a while. Btw, c has a really really good compiler lcc_win32, and I haven''t seen a free c++ compiler/ide near as good as that one. I have checked out devc++ but it seems it doesn''t have automatic indentation (or I might be doing something wrong).
Besides I will do more of my code in a functional languages in the future, at least prototyping, since functional languages (Haskell in my case) really really speeds up development.
ada is also a nice language. Better than c++ but don''t have that much support in the programming world.
I have _never_ seen a _compiler_ with automatic indentation. I have seen a lot of IDE''s with that particular feature though.
Advertisement
LOL
How true

~~~~~~~~~~
Martee
http://www.csc.uvic.ca/~mdill
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
I''ve decided the best thing to do is to learn both, then write mostly in C. If you get a situation where you think something in C++ would be neat for a specific problem, then use it.

But I''d warn you not to get into C++ over-enthusiasticly. You''ll end up making a horrible mess of inherited classes which you can''t understand. (well I did anyway).

For instance, I use C style structs, but I give most of them C++ destructors, so I can just delete them without worry. Why don''t I make constructors? I just prefer to set their contents manually. It doesn''t make sense, but it works for me.

(That''ll really anoy the C or C++ purists won''t it?)

Frank
I won't claim to know very much about ADA, but this is the language described by The New Hackers Dictionary as 'crockish, difficult to use, and overall a disastrous, multi-billion-dollar boondoggle', right?

Frank: Yes. It annoys the hell out of me.

Edited by - Eraserhead on April 12, 2001 9:07:49 PM
quote:
- regards to ADA
''crockish, difficult to use, and overall a disastrous, multi-billion-dollar boondoggle''


Has goverenment written all over it, doesn''t it? (USDD)
My buddy loves it - the only other language he knows well is pascal. Given that; I''d love it too.


C/C++ Well, there''s only one thing you can do with C that you can''t do C++ (AFAIK). It''s related to casting (as opposed to convertering) scalar types; it can still be done in C++ but''s somewhat clurgy.
Given that, you''ll want to learn C & then C++.

The more I learn about classes & object design the more I find them indespensible.

DirectX is an OOD.
You can make performance mistakes with asm as well as C++.


Magmai Kai Holmlor
- The disgruntled & disillusioned
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

This topic is closed to new replies.

Advertisement