• 0

is c# better then c++?


Question

Recommended Posts

  • 0

C# is arguably an easier language to get into that C++. A lot of the management is done for you, memory, and so on. However, there is an underlying feeling that C++ is more powerful overall if you want to jump down to the depths (I can't argue either way on this, I make apps that don't require me to go THAT deep).

As for Linux, yes - there is MONO, but it's a port, it's not pure C#.

  • Like 1
  • 0

To decide which is better we need to know what you want to use it for. It's a bit like asking which is better, a Ferrari or a Mini van? Each has their uses and pros/cons, and if you make the wrong choice you will find things very difficult.

C++ is ultimately more powerful, and allows you much finer grained control. It is essentially the language that most of the big OSs are written in. But for most of us normal programmers their is no need for that level of control, especially when you consider that if you get it wrong things will go disastrously wrong very quickly. C# will be easier to learn, and if nothing else will give you a basic grounding that you can use to move up to C++.

  • Like 2
  • 0

C# is arguably an easier language to get into that C++. A lot of the management is done for you, memory, and so on. However, there is an underlying feeling that C++ is more powerful overall if you want to jump down to the depths (I can't argue either way on this, I make apps that don't require me to go THAT deep).

As for Linux, yes - there is MONO, but it's a port, it's not pure C#.

c# is an open standard, mono is an implementation of that standard as it the .net framework. afaik

  • 0

Yes, C# is better than C++. It's much more elegant and doesn't have much of the legacy stuff that comes with C++. Whether or not you want to use it as a learning language is more a personal preference thing. I tend to recommend C++ over C# for learning, since it gives you experience with lower level concepts such as pointers, whilst still offering object-oriented goodness, but C# allows you to dive straight in more easily and handles all the lower level stuff for you.

C# is supported (as others have said) on Linux through the Mono project, so it's perfectly usable on Linux. You may come into ideology conflicts with Linux users if you create software using it though :)

  • 0

Short answer: C# is far easier to learn if you're just starting out.

Long Answer: C# is far easier to learn, but you never really have to learn about memory management with C# which is an important part of software development. Though, it's arguably less relevant in C# because it's a managed language. You can always use C# to learn the ropes of object-oriented development, and then go back to focus on memory management in an unmanaged language like C++.

C# also has better tools, which can make it significantly less frustrating to develop. You can use Visual Studio for both languages, but C# has syntax highlighting, type-ahead, intellisense, and all other modern features of IDEs built into the language (it's a .NET language after all). C++ has some intellisense, but no highlighting or anything else. For beginners, this might be a huge obstacle.

For 99% of anything software developers will ever have to do, C# a good choice. For the other 1%, videogame development, C++ is arguably the better choice. And by "arguably" I mean C++ is only better if you're planning on writing the next Unreal Engine. C# is actually very capable for making small 2D and 3D games.

  • 0

IMHO C++ is better; one of the first and foremost reasons is RAII which lets you manage resource (notice the difference here: GCs only manage memory!, but memory is the least dangerous garbage you may produce in a [modern] system?) in arguably the cleanest way possible - as you don't have to do anything yourself?

Another big advantage is that the whole library is developed under strict control in terms of runtime complexity - a feature you'll never be able to find under C? (or Java for that matter)?

  • 0

What's with all the soft wording :\

C++ is a much more powerful and faster executing language. Depending on the compilers you are using, you can even insert compiler code directly into the app for those processes you want to scream along. C++ runs as native code. It's compiled to be as efficient as possible on which ever platform you run it on. It's far "lower level" and lacks a lot of niceties that higher languages possess (such a Just-in-Time debugging).

C# is far FAR faster to deploy in. It is also far more forgiving of mistakes. In the process is being so, it is also far slower. Where as C++ runs code that is compiled directly for the CPU, C# runs as a managed language. You don't have to worry about assigning memory as the CLI handles that for you. You can make small mistakes in your code and have it continue to run. You can't do as much (but it's fairly negligible a difference for the average coder).

Personally, given the work I do, I much prefer C#. I enjoy the niceties of the .net framework (this should be what ultimately makes the decision for you). That said, I personally believe that if you want to be a serious coder, you should learn on C++ so you know exactly what C# is handling for you in the background. That way you will realise exactly how much CLI handles and why it's so much slower than C++ for HPC uses.

tl;dr - C++ first then C# if you plan to be a serious coder. C# first and no C++ if you don't care.

  • Like 3
  • 0

My vote goes to C#. It's still a C Based language so it feels very close to C++ albeit cleaner. The .NET Framework provides most everything you need, anything else can be made using the framework and piecing parts together. I spend 90% of my work day in C# and it is a great experience.

  • 0
What is easier to learn?
C# and by far.
does it work on linux?
C++ has gcc and clang for compilers, as well as a few different IDEs, while C# has mono and the monodevelop IDE. Contrarily to some resilient myths, mono is not "unpolished" or "dangerous" or such. It's every bit as polished and alive as any C++ compiler on Linux, and a quality solution used by professionals.
there is MONO, but it's a port, it's not pure C#.
Mono is an implementation of open standards just like gcc or clang. I don't know what you mean by "pure C#", as Microsoft's .NET itself is written in C++.
In the process is being so, it is also far slower. Where as C++ runs code that is compiled directly for the CPU, C# runs as a managed language
C# is also compiled to machine code, it just does so usually "Just-in-time" rather than always ahead of time like C++. While C# does make compromises on performance where C++ makes none, it still offers comparable level of performance in most cases, and saying it's "far slower" is an exaggeration. I'd even say that it's easier to write fast code in C# than C++, leading to faster programs given the same time constraints.

Of course if what you're writing is scientific high-performance computing code, then C# isn't what you should be using, but I'm talking about the general case.

Another big advantage is that the whole library is developed under strict control in terms of runtime complexity - a feature you'll never be able to find under C?
I've heard that from Herb Sutter and it's quite amusing. Yes, most of C++'s library has its complexities documented, but maybe because there isn't much more than containers and algorithms in the C++SL... Containers and algorithms in .NET also have their algorithmic complexities documented, but there is no point documenting the algorithmic complexity of a Printer or Socket class.
But if you want to learn about pointers, you have to go with C++.
There are pointers in C#. And reference vs value types is basically the same idea as pointers vs values in C/C++.
  • Like 2
  • 0

It's not like C++ is "hard" like assembly.

IMO if someone finds c++ hard to learn then maybe a job in computer tech is not for him/her. Or maybe it explains why so many apps are slow as hell these days.

This said c++ is kinda "dead". Last time i saw a job requiring c++ knowledge was a long time ago. Most jobs theses days require .net, java, php, mobile frameworks, etc or old languages like cobol or sas for jobs in banking and inssurance (anyway where i live might be different for california ;).

c++ is mostly used for video game engines and by scientist for simulation and such (or in old programs made with it). Basically it's used for things that can stress a computer. And for such jobs usually c++ may be not enough as you need to understand assembly too and need to have a very good knowledge in algorithmic and mathematic (anyway last time i checked there was still some assembly used).

If your goal is to learn and become a computer eng then you should start with c++. I would even go as far as to say you should start with assembly. In fact you should start with mathematic as it's the basis of being a computer eng. It's more important to learn the concepts first. Starting with the language is not a good idea. You can learn mathematic and algorithmic and oop concepts without even using a computer.

If you goal is to write a simple linux app and you don't care about being a good dev then c# if mono is good (can't say never used mono). It's definately easier.

  • 0

C# is far FAR faster to deploy in. It is also far more forgiving of mistakes. In the process is being so, it is also far slower. Where as C++ runs code that is compiled directly for the CPU, C# runs as a managed language. You don't have to worry about assigning memory as the CLI handles that for you. You can make small mistakes in your code and have it continue to run. You can't do as much (but it's fairly negligible a difference for the average coder).

Even C# is compiled to native code. But that is done by the JIT compiler on first run. This is a common myth.

  • 0

What is easier to learn

It depends how you look at it. If you already know how to use the OS facilities and third party libraries, then I'd say C++ is generally quicker to learn. By generally, I mean the common stuff, basic OO, commonly used STL classes, etc. And if you already know C, learning C++ is made that much easier.

With C# you'll need to learn both the language and the dotnet library. In terms of difficulty, it's probably on about the same level as Java. After all C# was Microsoft's answer to growing Java use.

and does it work on linux?

I wouldn't recommend using C# or dotnet outside of Windows. Its support is sketchy at best, and most Linux distributions are blacklisting it (Mono) due to precarious licensing issues. Furthermore, the proprietary Windows Forms also won't be available outside of Windows, so if you intend on writing a GUI application, you will have to use something else.

If you want to run your code on GNU/Linux or support multiple platforms, C++ is the better option. It's well supported across every major platform, and there are free open source tools aplenty to aid in development. You can even write a Windows C++ application inside of Linux with GCC cross-compilation and Wine for testing.

  • 0

c# is an open standard, mono is an implementation of that standard as it the .net framework. afaik

Actually it's not an open standard because Microsoft controls it and nobody else has input on it. It's a registered standard with EMCA, but that's as far as it goes. It's also patent encumbered, so there's a risk in the future that other implementations could get shutdown. It's best to avoid those headaches. At least C++ is a true open standard.

  • 0

I'm surprised nobody has said Java yet. Eclipse is a great free Java IDE, Java and C# are almost the same language, and Java is perfectly cross-platform, including GUI's.

I'm studying Applied IT and have been writing Java since september now. I've always used Eclipse with it, but I feel right at home in Visual Studio using C#. No reason to limit yourself to Microsoft with C# right from the beginning.

(in fact, C# is strongly 'inspired' on Java. But Java sort of forces you to write cleaner code (in my opinion), which will help you later on)

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • If you look around on Amazon, some of these are available for $9
    • I’m still using an Xbox One S, so time for an upgrade to play this but as much as I hate Sony, I think I’ll get the ps5 pro
    • I bought this game. Played it for an hour, and then got a refund from Steam. Not a fun game at all.
    • Nothing Ear buds with active noise cancellation are at their lowest price ever with 51% off by Fiza Ali Amazon is currently offering the Nothing Ear wireless earbuds at their lowest price ever with 51% off limited prime deal. The earbuds feature an 11mm dynamic drivers with a ceramic diaphragm, and support high-resolution audio codecs including AAC, SBC, LDAC, and LHDC 5.0. They support active noise cancellation of up to 45dB across a frequency range of up to 5000Hz, and include a smart ANC algorithm, adaptive noise cancellation, and a transparency mode that allows surrounding sounds to be heard when needed. Connectivity is provided via Bluetooth 5.3, with support for multiple profiles including HFP, A2DP, AVRCP, and others. The earbuds also support dual connection, allowing them to be paired with two devices at the same time. Additional features include IP54 water and dust resistance for the earbuds and IP55 for the charging case, in-ear detection, pinch controls, low-latency mode, Google Fast Pair, Microsoft Swift Pair, and a three-microphone system per earbud for clearer voice calls. The Nothing X app, available on Android and iOS, provides access to custom EQ settings, bass enhancement, personal sound profiles, ear tip fit testing, firmware updates, customisable controls, dual-device management, and a find-my-earbuds feature. In terms of battery performance, each earbud has a 46mAh battery and the charging case has a 500mAh capacity. With active noise cancellation (ANC) turned off, the earbuds should offer up to 8.5 hours of playback on a single charge and up to 40.5 hours in total with the charging case. With ANC enabled, playback should last up to 5.2 hours on the earbuds and up to 24 hours with the case. For calls, talk time should reach up to 5 hours on the earbuds and 23 hours with the case when ANC is off, while ANC on should provide up to 4 hours on the earbuds and 18 hours with the case. Finally, fast charging should deliver up to 10 hours of playback from 10 minutes of charging when ANC is disabled. Nothing Ear Wireless Earbuds Bluetooth: $73.15 (Amazon US) - 51% off Good to know This Amazon deal is U.S. specific, and not available in other regions unless specified. We only use first-party seller links (at the time of article publishing); ensure that you purchase from a first-party seller link only. Check out Today's Deals on Amazon | or our recent tech deals. Become a Prime member (for Students or SNAP) via Neowin Get Prime Access - Prime for half price (for qualifying Medicaid, EBT, SNAP) Subscribe to Prime Video, Audible Plus, Music Unlimited or Kindle Unlimited via Neowin As an Amazon Associate, we earn from qualifying purchases.
    • Microsoft officially launched its Copilot Cowork enterprise AI agent on June 16, 2026, switching to usage-based pricing on the same day it disclosed it is considering a Microsoft-hosted version of China's DeepSeek V4 as a lower-cost engine for the platform — a pairing that puts the company on a collision course with both its enterprise customers' security teams and a White House that has spent months trying to wall off Chinese AI from American infrastructure.................... https://www.techtimes.com/articles/318647/20260618/microsoft-eyes-deepseek-v4-copilot-cowork-what-azure-hosting-cannot-fix.htm  
  • Recent Achievements

    • First Post
      AndreaB earned a badge
      First Post
    • Week One Done
      Huge Trailer earned a badge
      Week One Done
    • Week One Done
      Classifyskilleducation earned a badge
      Week One Done
    • One Month Later
      eurospharma62 earned a badge
      One Month Later
    • Week One Done
      With What earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      590
    2. 2
      +Edouard
      174
    3. 3
      PsYcHoKiLLa
      75
    4. 4
      Michael Scrip
      68
    5. 5
      neufuse
      64
  • Tell a friend

    Love Neowin? Tell a friend!