Advertisement

C# vs C++

Started by December 14, 2002 12:47 PM
27 comments, last by Fuzztrek 21 years, 11 months ago
Wait! Don''t close this thread yet! This is not a C# vs C++ war! I really think someone should create a list of pro''s and con''s for c# and c++ so that newbies can figure out what the heck the difference is. I''ve heard soo many rumors going around.. like C# is slow.. c++ is messy.. etc etc. None of which I believe, however it *would* be nice to have a consolidated source to figure out which language is best for which job. I don''t think anyone should list pro''s/con''s on the forums, but perhaps someone could write an article or something. Hum.. now I think that I should have posted this in the article propsals and ideas forum. Anyway, perhaps this is something that cannot be answered until dx9 comes out? (note that I use dx 9.) Again.. please don''t turn this into a flame war. I, personally, don''t know enough of either language to explain their good points and bad points. I feel as though this thread will be abused anyway, but I hope that it will not be. Thanks! ¬_¬
I doubt this question is going to get *you* anywhere. But I think flame wars are hilarious.

EDIT: Who cares anyway? I learnt C++ about seven years ago and thought it was great. Now I'm learning C# and I think it is great. That's my level of preference on the subject.

[edited by - NotAnAnonymousPoster on December 14, 2002 2:16:49 PM]
"C combines all the power of assembly language with all the ease of use of assembly language"
Advertisement
You can try C# at microsoft.com, you have 3 hours of free access
to Visual Studio .NET

It is NOT illegal, it''s at http://msdn.microsoft.com/vstudio/tryit/
I personally don''t like the C# language, I think C++ is lots easier...
But it''s just me, I''ve seen many sites saying that the C# code
is a lot easier to understand and that it''s more simple.

Kamikaze
I have heard all this buzz about C#. What is it?

[edited by - CodeMaster000 on December 14, 2002 2:24:07 PM]
quote: Original post by NotAnAnonymousPoster
I doubt this question is going to get *you* anywhere. But I think flame wars are hilarious.

EDIT: Who cares anyway? I learnt C++ about seven years ago and thought it was great. Now I''m learning C# and I think it is great. That''s my level of preference on the subject.

[edited by - NotAnAnonymousPoster on December 14, 2002 2:16:49 PM]


What?

¬_¬
from what i understand, C# is microsoft's version of java. in fact java really does look like C++ and so does C#. C# is really only for the internet, so if you're looking to program games that have more than 2 dimensions and don't run in a web browser, C# is not the way to go

C# is simply a scripting language for the internet, like java, perl, PHP etc.

C++ however is a true programming language in that it writes programs for the computer and not applets for the web. C# certainly can't use directx, either (unless i'm mistaken!!)

anyway if you're really serious about making games, C++. if you just want to learn a little bit and maybe make a little game for the internet, C#.

(information in this post is deemed reliable but not necessarily accurate, hehe. in other words, i may be wrong)

[edited by - Drakex on December 14, 2002 3:34:30 PM]
_______________________________________________________________________Hoo-rah.
Advertisement
You never know, C# and the whole .NET thing might live up to the hype to a greater extent than you think. There are other implementaions than MicroSoft''s, even some projects to get it going on *nix.

Also, DX9 has C# bindings. Who knows, maybe someone will implement the C# bingings on *nix too.
quote: Original post by Drakex
C# is really only for the internet, so if you''re looking to program games that have more than 2 dimensions and don''t run in a web browser, C# is not the way to go

C# is simply a scripting language for the internet, like java, perl, PHP etc.

C# certainly can''t use directx, either (unless i''m mistaken!!)

anyway if you''re really serious about making games, C++. if you just want to learn a little bit and maybe make a little game for the internet, C#.

I''m guessing you''ve never actually used C# ...
quote: Original post by Kamikaze15
You can try C# at microsoft.com, you have 3 hours of free access
to Visual Studio .NET

You can also download the .NET Framework SDK, or try out Mono or Rotor.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers
quote: Original post by Drakex
from what i understand, C# is microsoft''s version of java. in fact java really does look like C++ and so does C#. C# is really only for the internet, so if you''re looking to program games that have more than 2 dimensions and don''t run in a web browser, C# is not the way to go

right

quote:
C# is simply a scripting language for the internet, like java, perl, PHP etc.
C++ however is a true programming language in that it writes programs for the computer and not applets for the web. C# certainly can''t use directx


wrong

quote:
anyway if you''re really serious about making games, C++. if you just want to learn a little bit and maybe make a little game for the internet, C#.

right

quote:
(information in this post is deemed reliable but not necessarily accurate, hehe. in other words, i may be wrong)

right

The big difference between C# and C++ is that C# runs in a "Managed runtime." This means that there is a garbage collector to track memory for you(don''t have to free it manually), there are extensive class libraries available to you(mainly for windowing, networking, and interop), and security is integrated into the language and the runtime(you can sign components, and only run signed components from you app if you so desire).

C# gets compiled down to IL, which is analogous to java bytecode. When you load a c# program, it gets JIT compiled to x86(or whatever platform you''re running on). Because of this, in theory a C# program can be just as fast as a native c++ program. In fact, things like allocations will be faster, since memory doesn''t get fragmented.

DX9 will have managed extensions to C#. One of the nice things about .NET is that it is really easy to interop with other COM programs(like DX), so using DX9 through C# is probably going to be easier than using it through native C++.

C# can be used like a scripting language with certain website technologies(like ASP.NET).

Personally, I prefer C++(because of the stl), but with generics scheduled for the next release of C# that may change... =)

This topic is closed to new replies.

Advertisement