   .NET, is it better?
  Hey,I've noticed that many people program in .net (C++.net or c#). What i was wondering is what is better about C++.net than normal native C++? And is C# not a lot slower than native C++ since games can't afford a loss of performance.   
  .NET (among a few things) provides a very large library of code to draw from, and C# isn't really slow.   ;C# and C++/CLI can be almost as fast as C++ if properly written.  I would recommend getting a profiler that will profile your managed code to signal these performance gotchas clearly.I have a newtork library for C++ that i have written based on the API for C# for sockets and other network realted tasks.  IMHO, C# performs very well.All that said. I still develope games in C++.  The number of 3rd Party Libs and C++ is my "native tougue" are my only legit reasons.FYI and not to gloat. I wrote a gamespy replacement in C# for a multiplayer game written in C++ so I have seen both sides.   ;  in short, yes .NET is better.you only have to worry about speed if you're making a AAA title or you have a VERY VERY intensive Physics, AI, and/or rendering framework going. 98% of people don't. Even though they believe they do.   ;  Thanks for all the replies! And what is different between native C++ and managed C++? Is there like a difference in syntax for example?   ;  Benchmarks show that MC++ is much slower than anything else, It is not even recommended by MS unless you want to port some C++ code to .NET .C# is decently fast, but it is not faster than C++ , the difference is not noticeable as long as you handle your memory usage with care..NET is not better than native it is not worse either, it is just something different. Different things for different objectives   ;  A while ago I took my native C++ game and profiled it and then ported it to Managed C++ and profiled it again, it was about 5%-10% slower, which isn't bad at all considering my development time is significantly decreased with MC++. Granted, if you're making the next Quake 3 then 10% is probably inexcusable, but pretty much everyone here is making amateur or sideline games and 10% isn't a big deal. I also ported and profiled a C# program to MC++ and found no difference. I prefer C# over MC++ since C#'s syntax is a little more clean since it doesn't have to have backwards support for an old syntax, although MC++'s syntax still isn't bad. However, there are some libs that are very useful that only work with C++, so my main game development is with MC++ for the time being.Quote:And what is different between native C++ and managed C++? Is there like a difference in syntax for example?Yes, there are some differences like a class has to be declared with 'ref' or 'value' in front of it and managed pointers have a '^' instead of a '*' and you use gcnew to create memory instead of new. Also namespaces play more of a role. If you already know C++ then learning MC++ or C# won't be too hard and will only take you a couple of days, Google for some tutorials.   ;  Managed C++ is a hack.  An ugly, ugly hack.  If you plan to use .NET and you're writing new code, avoid Managed C++ and just go to C#.  Managed C++ is only useful in big enterprisey applications that would be too expensive to port to another language, so they write Managed extensions to hack the program to work with newer C# and VB.NET code.   ;Quote:Original post by JBourrieManaged C++ is a hack.  An ugly, ugly hack.  If you plan to use .NET and you're writing new code, avoid Managed C++ and just go to C#.Exactly how is it a hack and how is it ugly? I'm genuinely curious since I quite like it. :)   ;  And what is better to use, Java or C#?   