What is better?

10/15/2011 01:01 turk55#1
I been having this discussions lately with bausshacker
so i decided to make a poll
i personally say that C# is better than C++
and he says that C++ is better than C#.
please dont hold back and tell me what you think!
10/15/2011 01:08 BaussHacker#2
C++ can do anything C# can do + more. It's more efficient as well.

C# is easier to use and you can make a faster output, but it's not as efficient and it cannot work that well with memory and such things like C++ can.

It all depends on what you wanna code.

But really the poll is waste, the people voting C# have probably never touched C++ or even know what it is or even know anything about C# either.
10/15/2011 09:02 F i n c h i#3
C# is much easier than C++.
10/15/2011 13:23 Korvacs#4
You cant really compare them, they were designed for 2 different purposes, C++ is an Intermediate level language, allowing both aspects of high and low level programming, C# is a high level language which works with the CLI.

C++ is a high performance language which allows very granular control of memory and can become extremely complex, meaning that development time is often significantly longer than C#.

C# is a managed programming language which allows very rapid development due to the limited control over memory or limited need to control memory, as a result development can be a fraction of the C++ development time, of course you can end up sacrificing some performance as a result.

C++ was the language of choice 20 years ago, but nowadays its just not worth the time, C# is the future. C++ now is more of a specialized language used for specific tasks, high high performance server applications which will service tens of thousands of clients using some form of node based framework, this would be written in C++. Graphically demanding games will be written with C++ where as simpler games will not necessarily be written in C++, often nowadays games are written with XNA for example which uses the CLI and primarily C#. Alot of desktop applications are .net driven as opposed to being written in C++ aswell.
10/15/2011 13:44 BaussHacker#5
Quote:
Originally Posted by Korvacs View Post
You cant really compare them, they were designed for 2 different purposes, C++ is an Intermediate level language, allowing both aspects of high and low level programming, C# is a high level language which works with the CLI.

C++ is a high performance language which allows very granular control of memory and can become extremely complex, meaning that development time is often significantly longer than C#.

C# is a managed programming language which allows very rapid development due to the limited control over memory or limited need to control memory, as a result development can be a fraction of the C++ development time, of course you can end up sacrificing some performance as a result.

C++ was the language of choice 20 years ago, but nowadays its just not worth the time, C# is the future. C++ now is more of a specialized language used for specific tasks, high high performance server applications which will service tens of thousands of clients using some form of node based framework, this would be written in C++. Graphically demanding games will be written with C++ where as simpler games will not necessarily be written in C++, often nowadays games are written with XNA for example which uses the CLI and primarily C#. Alot of desktop applications are .net driven as opposed to being written in C++ aswell.
Actually most games these days are written in C++/Python.
10/15/2011 13:50 Korvacs#6
Quote:
Originally Posted by BaussHacker View Post
Actually most games these days are written in C++/Python.
I never disputed that, but there are now alot of games which arnt written in C++ or Python and are written with XNA, alot of the indie games on the XBL marketplace are written in XNA.
10/15/2011 15:23 Mr_PoP#7
Quote:
Originally Posted by unknownone View Post
The problem with C++ is it's not type-safe, it only pretends to be. You can nuke the type safety anywhere. (Although the same is kind of true for C# with reflection.)

The other problems are lack of higher level features like lambdas, reflection, coroutines, and lack of a standard threading model. A lot of these features have been added and finalized, but the new specification is not yet published, and no compiler has fully implemented the new spec. You can get parts of the new version of C++ in MSVC++, GCC and Clang though.

And then comes the problem with libraries. There are many, but they are generally all incompatible with each other, or have some essential features missing. You end up juggling through many libraries to get exactly what you want. (And as for running on all platforms - that's a joke, due to the library situation). Actually C# is way easier to port between major platforms now, due to more consistent libraries.

To give a library example, take boost::asio for networking. It's been considered a defacto standard for async networking in C++ due to it's portability and ease to use. The problem? It uses boost::shared_ptr<>, which is incompatible with the now standardized (and massively improved) std::shared_ptr<>. Meaning, whenever you need boost, you can't use some standard library features which are incompatible.

I was trying to get back into C++ after years hiatus learning and using C#, but the number of problems just put me off. It's in an awkward state until the C++0x specification is implemented properly in compilers, and many libraries, particularly boost, shift to using the new smart pointers and other newer features of the standard library. Then there's the tooling - IDEs, debuggers, profilers etc need updating to work with the new language. If all that is done, the language will return to a state where it can compete with C# in terms of high level abstractions.

Oh, and as for Battlefield using Python - it only uses small amounts of it. The game engine will still be written in a low level language like C or C++, and languages like Python are only used to script some game logic, AI and such, which doesn't require intensive computation. Python is very slow compared to even C#, let alone C++, and you'd be lucky to get 1 frame per second of high quality 3d graphics in it alone.
read it , it may help you! lol
10/15/2011 20:04 Chalkie#8
C# has two characters for its name, on the other hand C++ has three.
10/15/2011 21:00 IAmHawtness#9
I'd use C# for any kind of application I had to develop except for:
  • DLL injected "bot"
  • Servers
  • Games

The latter is debatable.
10/16/2011 00:57 BaussHacker#10
vb6, come at me bro.
10/16/2011 01:38 IAmHawtness#11
Quote:
Originally Posted by BaussHacker View Post
vb6, come at me bro.
That's what I started programming in :(
10/16/2011 04:03 InfamousNoone#12
Neither language is better. Languages are designed to be better suited for different tasks. It's obvious that C# and C++ were designed for two different tasks.

So unless you're something like Java and C# which were designed more or less for the same thing, then you're retarded.
10/16/2011 08:28 Cyanogen#13
C++ all the way. C# is good for knocking up useful apps and GUIs etc.. but anything hardcore, forget it, you have to hit the pointers.

I actually like application PHP programming. It's amazing what it can do, especially database wise.
10/16/2011 11:44 BaussHacker#14
Quote:
Originally Posted by IAmHawtness View Post
That's what I started programming in :(
Vb6 > Anything :cool:
10/17/2011 03:56 DeathByMoogles#15
Seriously, wasn't there a guy who made a D3D hook a while ago?
That shit had potential.
I could make a functional D3D hook with like a basic speedhack or some shit if someone wanted.