Advertisement

C or C++?

Started by April 11, 2001 02:38 PM
75 comments, last by Chronoslade 23 years, 10 months ago
quote:
Original post by Eraserhead

I have _never_ seen a _compiler_ with automatic indentation. I have seen a lot of IDE''s with that particular feature though.


Devc++ is just an ide... the compiler it uses is mingW.
And I believe I said compiler/IDE !!!

Better read before writing such stupid shit.

The one thing that might make ada difficult to use is it''s strong type-checking. Especially someone with c/c++ with background will have trouble with this at the beginning.
But when It comes to concurrency, ada is supperior. Especially considering that c/c++ doesn''t have any language support for it at all.
Advertisement
quote:
What bloat?


in other words, c has simpleness

i think it doesn''t matter which one is better, just which one you are more familiar with, and more prefer

OOP is good, but not that good that people should keep it in mind and piss it everywhere

------------------------------
Dedicate to nobody, I''m nobody
------------------------------------------------------CCP is fascistic, they even banned www.sourceforge.net
I appreciate all of the input from everybody it''s really helped me understand what I have to work with. Thanks.

"There is humor in everything depending on which prespective you look from."
"There is humor in everything depending on which prespective you look from."
quote:
Original post by null_pointer

C++ is slightly closer to the hardware, and it is a better procedural language than C.




It is? In what way? AFAIK, C is as close as you can get to the hardware and still remain portable (and even then not always). How does C++ get closer?


--


Get a stripper on your desktop!

C++ has the following operators: +=, -=, *=, /=, <<=, >>=, &=, |=, etc. which are normally binary operations, but use one of the operands to store the result:


int x = 10;
x <<= 1;
x += 15;
x >>= 2;



Assembly languages often have instructions in which one of the operands also stores the result. A C compiler would have to deduce this as an optimization, meaning C operates at a slightly higher level.

I''m not saying that you should switch languages over a difference like this, but it does disprove the "C is closer to the hardware" myth. That''s one reason why some people refer to C++ as the world''s finest assembly language.
Advertisement
I''m always shocked when I see how many people use C... Use C++, C was dead since the C++ came out...

Tim

--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
quote:
Original post by null_pointer

C++ has the following operators: +=, -=, *=, /=, <<=, >>=, &=, |=, etc. which are normally binary operations, but use one of the operands to store the result:


int x = 10;
x <<= 1;
x += 15;
x >>= 2;



Assembly languages often have instructions in which one of the operands also stores the result. A C compiler would have to deduce this as an optimization, meaning C operates at a slightly higher level.

I''m not saying that you should switch languages over a difference like this, but it does disprove the "C is closer to the hardware" myth. That''s one reason why some people refer to C++ as the world''s finest assembly language.


I suggest you check things before writing things you don''t have a clue about. Those operators have been in c at least since c89 to my knowledge. I haven''t heard a single guy say that c++ is the worlds finest assembly language. Probably since most people are smarter than this. C is much closer to assembly than c++. C++ contains a large set of highlevel constructs while most c construct are relatively straightforward to convert to asm.

quote:
Original post by Anonymous Poster

I suggest you check things before writing things you don't have a clue about. Those operators have been in c at least since c89 to my knowledge. I haven't heard a single guy say that c++ is the worlds finest assembly language. Probably since most people are smarter than this.



(I make one mistake and suddenly I am an idiot.)

Hmm...that's what I get for reading an old book. C has adopted a lot of useful features from C++.


quote:
Original post by Anonymous Poster

C is much closer to assembly than c++. C++ contains a large set of highlevel constructs while most c construct are relatively straightforward to convert to asm.



It should read "Most C code is much closer to assembly than most C++ code." The language doesn't force people to use higher-level constructs. But then again, most people are smarter than this.

Edited by - null_pointer on April 14, 2001 1:27:09 PM
Note I have never claimed that c++ can''t do the things that c can. Since c++ is more or less a superset of c that is obviously not true. I just meant the c is more natural to make low level stuff, I mean if you don''t use the highlevel stuff of c++ why use c++ instead of c ?

I have tried maybe 10 different programming languages and I''m still waiting for a good one. I really don''t think there is a language that is even close to perfect.

Just because a language has more features doesn''t necessarly make it better, it might just make it more messier. However, even if I don''t like all the features of c++ and I think all lot of is really bad, I still think that it''s slightly better than c. If it''s enough to make it worth a change... that is a tough question. But I''m really considering to change because c lack some important features that c++ has a halfgood solution to.
What I don''t like is the almost religous worship some people have to c++. I''m almost certain that c++ or c++ clones will not exist in the near future. They are simply not good enough. They are to errorprone and unnatural for humans. Functional languages are better suited but a bit undeveloped at the moment. But I don''t even think functional languages is the solution for the future. I know one still better one but it''s really hard to explain and even harder to realize. Todays languages are still constructed around the machine instead of the human mind. And as long as they are they will be a serious limit for what software will be able to do and how complex they can be. The biggest fault that todays languages have is that they are mainly seqential. That is how machines work, not the human mind.

This topic is closed to new replies.

Advertisement