C#

Started by
16 comments, last by ChocaPaluza123 22 years, 8 months ago
I was watching the .NET show about C# and I thought it was really cool. I was wondering if you guys know if it''s slower, cause I don''t want it to be really slow. So what I was wondering is, is C# suitable for games?
C++
Advertisement
Some people argue that Visual Basic is suitable for games.

C# is pretty fast, but you mustn''t forget all of the built-in features it has that carries overhead. For example, garbage collection and array boundary checking. You can disable those features, and for extra speed you can put code in "unsafe" areas. So, by the time you get C# as fast as C or C++ by disabling the safety features, you might as well use C or C++ for real.

The biggest worry, actually, is C#''s use of the CLR. I''m not sure if the C# compiler will compile to truly native code. Maybe it does...but if it doesn''t, you''re not getting much faster than Java.
C# and VB7 do not support compiling to native code.
The CLR compiles the IL code to native in memory (you can have it do it either by function, all at run-time, or at compile time). C# beta 2 is faster than VB6 SP5...and that''s with Beta code, debug info and all. If DX comes out with a .NET version (instead of just wrapping the COM version in .NET functions) it''ll increase the speed a lot since it won''t have to go through the COM Interop layer. .NET comes with some DirectX samples for you to get your feet wet.

If you know C++ (or VB)...then learning C# is a breeze. There are some good books out that are like "C# for Programmers" that''ll walk you through the major changes.


Epolevne
I think I like C#. C++ is way too strange. Plus, The beta for VS.NET is awesome! I think I can sacrifice a little speed for a better language. Even if I do need speed, I''ll just do a few graphics routines in Assembly or something. What do you guys think of C#?
C++
Now now now. Let''s not call one language "better" than another; nothing is better than anything else in any absolute sense.
Sorry, I must have said that wrong. What I meant was that I could sacrifice some speed for a language better suited for me.
C++
hehhee...use C# or any .net product, then through some asm in it...heh...no, really, that''s not defeating the purpose of the .net concept... : )

G''luck,
-Alamar
Microsoft said: <>

- it is true, but only because VBA porgrammers must use a lot of DLLs (written in C++) who make all for us.

Microsoft said: << (...) There are more subtle features that make C# a great Internet programming tool>>

For the web, you have PHP, java...

Microsoft said: <>

Sure, for Microsoft programmers who never release memory. (Just take a look at Crimson Skies).

Microsoft said: <>

Only bad programmers must often update (patche) their code. For example, it takes 8 versions of DirectX to have the same OpenGL level.


quote:Original post by bobatefrei
Microsoft said: "Compared with a language such as Microsoft® Visual Basic®, equivalent C and C++ applications often take longer to develop."

- it is true, but only because VBA porgrammers must use a lot of DLLs (written in C++) who make all for us.


So you''re saying C/C++ people should not have the same benefits of libraries to make life easier for us?

quote:
Microsoft said: "(...) There are more subtle features that make C# a great Internet programming tool"

For the web, you have PHP, java...


PHP and ASP and JSP and all those other scripting languages are really very badly designed. They were written by programmers, for programmers. The internet is supposed to be a place where anyone can make a name for him/herself. Why should they have to learn to program as well? If you''ve ever seen ASP+ in action, you''ll appreciate what I''m talking about. It''s like moving from COBOL programming to C++.

quote:
Microsoft said: "Garbage collection relieves the programmer of the burden of manual memory management."

Sure, for Microsoft programmers who never release memory. (Just take a look at Crimson Skies).


Now that''s just silly. Garbage Collection is not to allow people to write sloppy code. You''ve got to structure your code just as well to best take advantage of it. But it does make your life a hell of a lot easier.

quote:
Microsoft said: "Updating software components is an error-prone task. Revisions made to the code can unintentionally change the semantics of an existing program."

Only bad programmers must often update (patche) their code. For example, it takes 8 versions of DirectX to have the same OpenGL level.


No. You should be constantly trying to update your code and make it better. Name me one company that releases version 1.0 of their application and then stops make more versions.


War Worlds - A 3D Real-Time Strategy game in development.

This topic is closed to new replies.

Advertisement