Jump to content

Differences between C# and C++


AggrorJorn
 Share

Recommended Posts

Hi,

 

I don't have much programming experience but I want to know some general information about the differences between C# and C++. Is there really much difference between these 2. It's common knowledge that C++ is more difficult. But what I've seen so far with C++, it doesn't differ much from C#. I could be ofcourse very wrong about this.

 

Can anyone tell me the differences, ups, downs or experiences with C#?

Link to comment
Share on other sites

I think the main point is C# has memory management which can make complex apps a lot easier. However, most third party libraries you will find are written in C++, so I am not sure what the point of using C# is. There are easier languages that are cross-platform compatible like Java and BlitzMax. I think C# is still Windows-only. There might be some workarounds, but since it is MS you know they are probably never going to put real effort into Linux and Mac.

 

There are other people who know a lot more about C# than me, so take that with a grain of salt.

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

C# as a language is pretty nice. Lack of default arguments gets annoying sometimes, but overall I prefer C# syntax to C++. You can call native DLLs from inside .NET (C#, Boo, VB.NET, IronPython, etc) although you might have to write some wrappers to handle data type conversion. Not having to worry about memory management is nice as well. Mono is a cross platform .NET implementation maintained by Novell. It's what Unity uses so that the same code can run on PC/Mac/iPhone.

 

So in theory, C# (or any other .NET language) is possibly a better choice as far as ease of use. In practice, I don't know what the state of the .NET bindings is, so you might have more trouble fighting with the bindings than just using C++.

Windows 7 x64 - Q6700 @ 2.66GHz - 4GB RAM - 8800 GTX

ZBrush - Blender

Link to comment
Share on other sites

I think the main point is C# has memory management which can make complex apps a lot easier. However, most third party libraries you will find are written in C++, so I am not sure what the point of using C# is. There are easier languages that are cross-platform compatible like Java and BlitzMax. I think C# is still Windows-only. There might be some workarounds, but since it is MS you know they are probably never going to put real effort into Linux and Mac.

 

There are other people who know a lot more about C# than me, so take that with a grain of salt.

 

Without any intent to be offensive, most of the things you said are obsolete or wrong.

First of all, there are few third party libraries that you will need for C#, considering it's backed up by a completele framework. In other cases, I have always found what I needed as 3rdPL to make my application work.

The easiness of a language is really subjective, so I won't comment on this. C# is not Windows only anymore, since Mono is out of Beta and DotGNU is coming along pretty nicely, as far as I know. I have run many applications on Linux, although I do not have a Mac to test.

Link to comment
Share on other sites

  • 3 weeks later...

Josh is right about MS not spending time on the crossplatform part, but what they did do was open .NET specs so anyone can create it on any platform. MS won't do this themselves for obvious reasons, but it was smart to open it up so someone else could create .NET on other platforms, which they are doing.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...