Skip to main content
gamedev.net
🔒 Locked

C is unnecessary

Started by Enselic May 3, 2003 at 8:22 AM 197 replies 17.4k views
Original Post
Enselic
Enselic
I''m not sure weather this discussion has been taken, in that case I''ll immediatly delete this thread. Anyway, I find this discussion of unlimited interest.
My statement:
There is absolutley NO reason to code in C anymore since we have C++.
Please present any arguments against my statement without a flame-influence. ____________________ ____ ___ __ _ Enselic''s Corner - CodeSampler.com
CloudNine
CloudNine
My take on the subject:

C++ makes data managing easier, with the new and delete keywords.
eldee
eldee
there will always be a reason to code in C..
people still code in COBOL and Fortran. its also a maintenance issue- there are several million pieces of software coded in C already...

-eldee
;another space monkey;
[ Forced Evolution Studios ]

::evolve::

Do NOT let Dr. Mario touch your genitals. He is not a real doctor!

Leffe
Leffe
Waaahh! C compilers are faster
Damage_Incorporated
Damage_Incorporated
All programming languages are useless there is nothing you can''t do with binary code. That is all I have to say on this subject.

- Damage Inc.
Enselic
Enselic
If that wasn't a joke:

Diffrent languages serve different purposes. But since C is not diffrent from C++ since C++ is extended C, C could be thrown into the paper-basket.


____________________ ____ ___ __ _
Enselic's Corner - CodeSampler.com

[edited by - Enselic on May 3, 2003 9:33:03 AM]
civguy
civguy
C is simpler than C++. Well written C++ code has a great deal more of complicated language constructs compared to well written C. Not everyone has the time to learn these features, so it may be more efficient just to get the job done in C than for everyone to learn all C++ aspects.

Just take a look at some of the Boost''s more complicated libraries. You may not have a slightest idea of what''s going on there, since they abuse so many of C++''s features. But if something vaguely similar was written in C, it''d be done with the relatively "few" constructs C has and you could at least start trying to comprehend it.

One could say that "just use a couple of C++ features, those that are handy" and treat the Boost libraries like black boxes that do something neat. But where to stop? Are templates too complex? Template metaprogramming probably is. How about making proper use of classes? Assume everyone has read Design Patterns? Should const correctness be used or is it more trouble than it''s worth? The list goes on.

C++ definitely has a hefty deal of more expressive power than C, but you have to take other kinds of practical values into consideration too.
stefu
stefu
quote:
Original post by Enselic
Diffrent languages serve different purposes. But since C is not diffrent from C++ since C++ is extended C, C could be thrown into the paper-basket.


Then why don''t then just do so and be happy?
Enselic
Enselic
There noone saying that just because you have a neat load of features, you shall use it. If someone say "C++ is too complicated, learn C instead" they havn''t really though. You can study the complicated parts of the language later on.


____________________ ____ ___ __ _
Enselic''s Corner - CodeSampler.com
civguy
civguy
quote:
Original post by Enselic
There noone saying that just because you have a neat load of features, you shall use it. If someone say "C++ is too complicated, learn C instead" they havn''t really though. You can study the complicated parts of the language later on.
Not everyone is writing code alone, you know. When working in a team environment, you can''t just "learn as you go" and "write as advanced C++ as you can".
thy MC
thy MC
new thread:

enselic is unnecessary
Please AGREE or I will LIBERATE you
Enselic
Enselic
quote:
Original post by Enselic
Please present any arguments against my statement without a flame-influence.


Enselic
Enselic
C doesn''t support classes which is not good. You should at least have the opportunity.
Java and C# isn''t as free as C++. No language is better than the other. There''s just advantages and disadvantages.



____________________ ____ ___ __ _
Enselic''s Corner - My site. Go test my game Spatra and see if you can beat it onto the Official Spatra Top 10.
CodeSampler.com - Great site with source for specific tasks in DirectX and OpenGL.
intransigent-seal
intransigent-seal
quote:
Original post by Enselic
Java and C# isn't as free as C++.
Can you explain this please? I can understand C# isn't as free as C++, but how is Java less free than C++ ?

Anyway, a few more arguments:
1) There are some devices for which C++ compilers do not exist, and C must be used.
2) C is more portable. In general, if you follow the C standard, then you can put your code through any modern C compiler, and it will compile and do what you expect it to do. But C++ compilers have a lot more variation, so even if you completely follow the C++ standard, you end up with code which doesn't compile in some compilers, or worse, compiles differently on two compilers.
3) Some people prefer C. You might not like it, but it's true.

John B

[edited by - JohnBSmall on May 3, 2003 10:58:22 AM]
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
Arild Fines
Arild Fines
quote:
Original post by JohnBSmall
I can understand C# isn''t as free as C++


I can''t.



"To assert that the earth revolves around the sun is as erroneous as to claim that Jesus was not born of a virgin."
-- Cardinal Bellarmine
--AnkhSVN - A Visual Studio .NET Addin for the Subversion version control system.[Project site] [IRC channel] [Blog]
Enselic
Enselic
By free I didn''t mean anything economic. I meant "you can do more lowlevel stuff".


____________________ ____ ___ __ _
Enselic''s Corner - My site. Go test my game Spatra and see if you can beat it onto the Official Spatra Top 10.
CodeSampler.com - Great site with source for specific tasks in DirectX and OpenGL.
intransigent-seal
intransigent-seal
quote:
Original post by JohnBSmall
I can understand C# isn't as free as C++
Original post by Arild Fines
I can't.
Well, ok, I wasn't aware there was a free C# compiler/interpreter, obviously I was mistaken.

John B

[edited by - JohnBSmall on May 3, 2003 11:08:09 AM]
The best thing about the internet is the way people with no experience or qualifications can pretend to be completely superior to other people who have no experience or qualifications.
tuxx
tuxx
Enselic, why do you necessarily need classes? You have basically the same thing in C, just C++ is more idiot-proof:

  
// C way of doing things

struct foobar
{
int a;
char b;
float c;
};

int foo_bar(struct foobar x);
int fobar(struct foobar x);
int fooobar(struct foobar x);

// C++ way of doing things

class foobar
{
public:
int a;
char b;
float c;

int foo_bar();
int fobar();
int fooobar();
};

I don''t see too much difference here, only how the data is arranged. You might say, "But foobar->foobar() is easier to read than foobar(foobar)". Is it? Some people feel that the C way is better, because it automatically seperates data from functions, without factories.

If it helps, NWN and Quake ]|[ were written entirely in C.
[email=dumass@poppet.com]dumass@poppet.com[/email]
tuxx
tuxx
There is also a lot of controversy out there on whether OOP is really better. Sure, you may think it is, but the main problems are that it is much harder to design OOP applications. You might want to Google it.
[email=dumass@poppet.com]dumass@poppet.com[/email]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.