Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Dot5

Whats the big deal with C#

This topic is 5209 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

In a previous post I saw a discussion on why game developers don''t use C#. The discussion covered numerous areas of compiler numbers , students etc. What nobody questioned was why (apart from the fact it is a new language) would you use it? what does it do that is better than c++ for games? Even if C# was available for console development, why would you use it over C++? I have never looked at C#, but have heard people commenting on it being very good, but offering nothing to back this up. As a professional game developer for over 10 years, I have almost exclusively used C or C++ with no problems, but I think things are a little defferent now than in the past. Now more games are required to be networkable (LAN/internet/whatever) some publishers even make it a pre-requisite, even consoles are in on it, and they are the driving force for many developers. If C# offers better tools for networking then it might make sense to look at it further, but games are fine running on C/C++ versions right now, so again, it begs the question of why change? I am really asking these questions to people who use C# as thier primary (professional) language because, I would really like to know what it does well, and what it does not do well.

Share this post


Link to post
Share on other sites
Advertisement
Spend two days on C# and do some tutorials and you will understand the difference...


Have fun
Bunnz
Purple#, a shader-driven game engine for .NET.


[edited by - Bunnz on April 16, 2004 5:10:37 AM]

Share this post


Link to post
Share on other sites
quote:
Original post by Dot5
Even if C# was available for console development, why would you use it over C++?
Because it''s clean and C++ is filthy? Because C++ is huge, crufty and encumbered in an increasingly laborious legacy? Because Bjarne Stroustrup (the creator of C++) has said that "within C++ is a simpler language struggling to get out"?

quote:
I have never looked at C#, but have heard people commenting on it being very good, but offering nothing to back this up.
Well look at it!

quote:
I am really asking these questions to people who use C# as their primary (professional) language because, I would really like to know what it does well, and what it does not do well.
The web is littered with such evaluations.

Share this post


Link to post
Share on other sites
"I am really asking these questions to people who use C# as thier primary (professional) language because, I would really like to know what it does well, and what it does not do well."

Actually, I think you hit on the difference right there. I use C# because it lets me write code faster. I am not a professional, I''m a hobbyist. It''s about finishing projects before I lose interest. Maybe I am wrong, but I don''t get the feeling that many people here are using C# for professional game development.

I don''t know if C# has any value for professional developers. If you''ve been working in industry for 10 years you''ve no doubt noticed the ever-increasing complexity of software projects. C# provides some good tools to manage that complexity (better OOP, GC, ect). But of course others will argue that a good OOP design will do that regardless of what you are coding in. I suspect with .Net 2.0, C# will probably really take off. Maybe not for game programming, but definitely for everything else.

----------------------------------------
Let be be finale of seem, seems to me.
----------------------------------------

Shedletsky''s Code Library:

Open source projects and demos

Share this post


Link to post
Share on other sites
quote:
Original post by Oluseyi
Because Bjarne Stroustrup (the creator of C++) has said that "within C++ is a simpler language struggling to get out"?



Well the quote, as printed in D&E goes "Within C++, there is a much smaller and cleaner language struggling to get out." And to be fair, he''s also gone on the record saying that he doesn''t think C# is that smaller and cleaner language.

Not trying to start a fight, just nitpicking. I happen to like C#. Once you get used to its semantics, it becomes much easier to write a functional, correct applications-level program in C# than it would be in C++.

Share this post


Link to post
Share on other sites
quote:
Original post by SiCrane
Well the quote, as printed in D&E goes "Within C++, there is a much smaller and cleaner language struggling to get out." And to be fair, he''s also gone on the record saying that he doesn''t think C# is that smaller and cleaner language.
Of course he doesn''t, but Alexandrescu (widely considered the father of generic programming) has pooh-poohed C++ templates, saying something along the lines of "when I invented generic programming, I didn''t have C++ in mind."

Language inventors are a parochial bunch. I accept their objectivity as far as it concerns criticizing their own languages, and no further.

Share this post


Link to post
Share on other sites
Oluseyi:
why is C++ filthy, huge and "encumbered in an increasingly laborious legacy"? Is that something you have read, or come to the conclusion yourself? I do not find that to be the case (unless you are on about using MFC or other such tool).

There is a difference in my "looking at it" and talking to people who have used it properly as part of thier job for a sizeable project.

-----------------------------------------------------------

I was asking this because people could argue the reasons why Java isnt used for games dev. You could say its slow, crap, whatever but Java is still a useful language for its own reasons, and yes even for games it has advantages. You could look at the on-line evaluations of C# vs C++, but still miss the point of what it provides in terms of the development cycle as well as the finished product.

Telamon:
good points raised there. Thanks. It always concerns me when people talk about new languages offering better OO or better memory management/bounds checking or whatever because thats the job of the programmer anyway. Quite rightly you clarified this in your reply.

Share this post


Link to post
Share on other sites
quote:
Original post by Oluseyi
Of course he doesn''t, but Alexandrescu (widely considered the father of generic programming) has pooh-poohed C++ templates, saying something along the lines of "when I invented generic programming, I didn''t have C++ in mind."


I don''t think that *anyone* truly likes the way C++ templates were implemented.

quote:
Original post by Dot5
why is C++ filthy, huge and "encumbered in an increasingly laborious legacy"? Is that something you have read, or come to the conclusion yourself?


Oluseyi did embed several links in his post. But again, bringing in the Man (Bjarne Stroustrup) again; Stroustrup has repeatedly said that many of the features and syntax of C++ would be much cleaner if it didn''t support backwards compatability with C. And the direction that C is evolving makes future compatability a fairly large issue. Take for example the additional macro and pointer syntax features being proposed for the next C revision. My personal prediction is that if C++ continues to attempt to support compatability with all future C revisions, its going to implode, even despite the work the two standards committees are doing to maintain sanity.

Share this post


Link to post
Share on other sites
A couple of months ago there were 2 articles in c''t, a (actually the) German computer magazine.

I don''t have the article here, so I can''t post any exact numbers, but here''s what I remember:

The purpose was to compare the speed and efficiency of C++, Delphi, C# and Java. So they wrote programs in each language to do the same things, the programs were similarly structured but using some of each language''s typical features IIRC.

In the first article the non-OOP performance was tested and in the second the OOP performance. I know this is very vague, I don''t quite remember what the programs they wrote really did and what the most intensive tasks in these programs were.

For the non-OOP stuff, C++ scored really good, significantly better than Java and C# (I think they were about the same), Delphi was far behind due to some compiler bug (it was explained but I don''t remember).

For the OOP stuff however, C++ scored the worst. Delphi, C# and Java were much faster in that test, I don''t remember any details though, sorry.

Of course they said that it depends very much on what exactly you want to do and that these benchmarks were not representative for all situations etc, but it was quite interesting though.

If someone who has access to the magazines wants to look it up, the articles were in this and this issue.

I''ve been using C# for 5 months (not for games, I''m currently working on a form editor for a medical software) and I really like it. I don''t know C++ well, so I''ll not try to compare them, but from what I''ve seen many (most?) C++ developers who change to .net start learning C# instead of using managed C++ (quote from a book I have: "I''d rather have my teeth drilled than program in managed C++")

Share this post


Link to post
Share on other sites
I emmigrated to C# / Managed DirectX from C++ / Native DirectX because I discovered that it takes much less time to do what you want using C# / Managed DirectX. The .NET classes are many, many times more structured than the Win32 API counterparts. Also, Managed DirectX does a lot of low level stuff for you that is nothing but time-consuming and boring to write for yourself. And as someone stated, as hobbyist, chances are that I actually might complete my projects .

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!