Re: C# Beginner
Posted: 05 May 2010, 19:30
C# should be a little slower than C++ if your C++ is done in a bullet proof way. Garbage collector takes time to run. However, for most people, they will just have a bunch of leaks and the C# will run faster because of it after a few minutes. Also, C++ takes WAY longer to actually squeeze working code out of.Licho wrote:You heard wrong :)
There is no reason why C# should be significantly slower than C++ - it compiles to native code anyway and is distributed in CPU neutral way - so its always optimized for CPU it runs at.
There is some overhead but some things are faster than C++ (like memory allocations).
Generally for modern applications you wont notice any speed difference. You get most gains/slowdowns from design changes, and in C# its easy to code advanced design in easily to read and maintain form. And for expensive stuff framework uses native OS libraries calls anyway.
You can use any windows framework you want with C#/.NET. I personally used Windows.Forms, WPF, GTK.
Of course native windows stuff (windows.forms or WPF) gives you biggest performance on windows systems.
As for productivity - I have never coded in anything as productive as C# for large scale applications. Untyped languages like Python imo can't compete for larger projects. Also wealth of .NET libraries and internet resources is gigantic.
If you want to code something simple it's probably better to go Python - but for larger things, no way.
Also C# is just one of .NET languages, in fact you can switch to any other and you still keep same runtime/framework there are even tools that auto convert them from one language to another - you can code in functional F#, VB, managed C++, IronPython, IronRuby, Pascal etc..
For example PlanetWars project had parts coded in F# which looks nothing like C#.