Wow this really goes over stuff really well. I want to point out the C# does actaully have a tiny amount of control over the GC as you can finalize things. Now this does not guarentee like... anything but you can finalize something and clean up resources in a "destructor" in C#. C# also supports pointers and memory management through unsafe code but no one should really be using it unless they are a niche exception.
Can you help me with one thing? A desktop application that I wrote in C sharp would work on my system. But would not work on many other computers using the same OS. How does one deploy a C Sharp application?
I love the passion everyone has for their favorite language! Just as a bit of background, My first C++ project was in 1985 using CFront and my last was completed just a few weeks ago - a rather large application for the US military. C&C++ are my first loves as those were my first languages. I have built dozens of projects over the decades in C++, C#, and Java and I find all three to be quite capable and useful and enjoy all. I also have comprehensive training courses on all three platforms with thousands of students. Point is, I know and use all 3 and really have no preference. We left 30 minutes of video on the cutting room floor when making this, so we didn't cover every detail in this short video. Our goal wasn't to declare a winner, but to provide an answer to a very common question.
I love how Java and C# are so similar. I learned to program in Java, and was able to pickup C# very quickly, and love working with both. I’ve only dabbled in C++ in my side Arduino/Raspberry Pi projects, but hope to become proficient using it in my spare time. Thanks for the great information!
@@ryanrivera9623 I'm no expert but the reason why you could pick it up so fast was because of the same concept of the two languages: they both run on a virtual machine, one is JVM while another is CLR.
I've been a C# programmer for a few years, but I am switching to C++ because C++ can be portable and can be interfaced with other languages. Microsoft just can't provide tools that I want.
Thanks for the perspective. I have been struggling in deciding between C# for applications/backend and C++ for graphics rendering, maybe I will be fine with using both. But I feel I need to make a decision in order to facilitate efficient learning. I'm not a beginner but feel my progress is slowed by my tendency to jump between the two. Not sure if it is healthy.
personally, I though learning the programming rules for C++ was a easier than C#. But once I learned each language I found C# was a lot to use because of the reasons you mentioned.
To your point about C++ being useful for games, that's mostly true! If you're building an engine, or making a game from scratch C++'s performance is practically essential. I've used C# far more often for games though, since it's supported by engines like Unity and Godot, and tools like LINQ and interfaces can help manage complex collections of objects and their interactions. I like my engines in C++, and my game code in C#.
Depends on what kind of game/engine. If its its advanced/high performance 3D then yes I would go with C++. But if its just a 2D or basic 3D I would go with C# for the ease of use.
Good point. C++ Game Engines can be multiplatform since they use multiplatform gui code, while the c# doesn't provide the GUI code so it can be used everywhere including linux (.NET GUI does not work properly in Linux, even with WINE... only if you're lucky). Portability and ease of use, that's a great combination.
Any job these days is going to require C#, Java Script and Python. C++, while a superior language for sheer performance (in the right hands), does not lend itself well to the "average" code monkey. It's too easy for them to hang themselves with it. For that reason, it you have the honest ability to properly deal with C++ (and C) they are certainly nice to have on your resume and will probably allow to work your way into a higher paying job.
Not necessarily. I work for a multi-national software house, and we don't touch C#. Sadly for me, because C# is streets ahead of java for desktop application development. I hate java.
I'm late in here. Thanks for this comparison. As a software developer working more than 2 decades with C++ and C# I can agree with your speech. Both languages are similar but do have subtle differences. As a guide I would suggest the following: For UI use C# and technologies that are best for the task. For near-hardware-work use C++. To close the gap between C# and C++ use C++/CLI. For implementing communication protocols use what ever you want - there are so many available...
I took C++ and VB in school and taught myself C#, I found that C# was easier to learn; its like C++ and VB had a baby. You get the power of C++ and the Graphical interface like VB all in one. I have been programming in C# for about 12 years now from game programming to databases and other apps at work.
The question isn't Which to Learn, but Rather which to Learn First. Learn 1, you can Learn the Other in 30 days. I've never Learnt PHP, however since I know C/C++ and C#, I can easily understand PHP. The question, which First? C#. C# is like Visual Basic. It is forgiving if you make mistakes. After C#, you can learn C/C++. You'll have to learn a little extra to see how it works at a lower level, closer to the hardware.
I learned Visualbasic back in highschool. Never used it. So going with C# was a good place to start for me. It doesn't have to be identical. But if certain things crossover it makes the much less frustrating. While I haven't touched C(++) I can see how that would be the same for that language and C#.
what if im in highschool , i cant learn a language in 30days. So i learn c++ because it runs on android and c# doesnt. And i want to program for android.
@@sbypasser819 c# can be used for android and IOS apps even. Might not do what you want to do. But C# is multi platform. Check out Xamarin for Android specifically. But ultimately you want to learn C++ anyway so I'd say, if you are willing to start with that and you are still in high school. Please stay with C++. Especially if you want to do computer science at university later on.
True and the answer is assembly. I still build upon those 6502 days. And I still can relate performance issues back because of that understanding of assembly - although with x64 it’s not as trivial with that terrible extensive opcodes set.
I startet with C# because of my employer, but soon got hooked on the performance C++ offered. Some C# frameworks were terribly slow back then. Especially .NET Entity Framework. Almost all private projects are C++ now except where I'm forced to use other languages. The only thing I really miss are human readable compiler errors. Especially template-related error messages can be almost unreadable.
This was interesting. But I think which language to learn depends more on 1) the OS environment you are tasked with developing apps for, 2) why you are learning the language, and 3) what you hope to do with it. In the Linux world you are traditionally developing in C/C++ (or a higher level language) not C#, though that is at least possible now. In the Windows world, at least in the case of apps, C++ is rarely used anymore and the scale tips mightily to C#. Professional programmers will tend to want to learn those languages they enjoy and bring them the best market opportunities. Companies will tend to develop in the languages which make their IT staff most productive. On both these counts I think C# is vastly superior, at least in the Windows world, which, after all is the environment it was created for.
very good comparison. regarding the line "Programmer has no control over GC", while that's mostly true, the programmer can force the garbage collector to run by calling GC.Collect().
@McCullough & Associates yea it's not recommended but it's still used in cases where the programmer did some action that caused a lot of memory to be unused and unreachable and he wants the GC to free those memory allocations from the RAM at that point, so he calls GC.Collect() and after those memory allocations are freed the app will consume less memory and run faster since the GC, which freezes all threads (except for Gen2 collection when Background GC is performed) to check all memory allocations and free unreachable ones, will have much less memory allocations to review, thus the app's threads will be frozen for a shorter time, thus the app will run faster.
the best control you have over GC is structuring things to not need it very much. dont do mindless allocations of stuff, make good use of value types, so on, so forth. There's all sorts of stuff in c# that enables you to work around the GC, just look into the fixed keyword as 1 example.
Interesting, and a good explanation. I've prgramed in both C++ and C#, and have found myself frustrsted at times with C#. I've ran into a few situations were what would be simple in C++ was not possible in C#. Example: I had to modify an external library to do something that actually requied me to create a thread in it. The thread needed to finish its job before any application using it shutdown or the data would be lost. In C++ the thread would have to complete its job before it would stop processing. In C# the thread would just stop, regardless of its state at the time. Every mechanism, on paper, that was supposed to allow me some control over the thread in C# was bypast completely.
Extremely well done. From my admittedly short experience with C#, I find it gives you a ton of tools to do everything. C++ gives you the machinery to make the tools. Sure C++ doesn't have a webapi out of the box, but you can make more meaningful abstractions with C++ than C#. That, and C# is a OO language first and C++ is exactly as OO as it is functional.
4:20, C++ hasn't the interface keyword, but has virtual, override, final and '= 0' for the 1st f() in an "interface". It has also the slowness that only an interface can provide. For strongly typed as parameters and returning, it's pretty easy to code them by yourself. 5:50, oh, my! You didn't mention the containers C++ has in its standard library, all of them managing automatically their own memory, making memory leakings a challenge. And for raw pointers, there's always the option to wrap them into a class, making your own smartpointer, if this last 1 was not an option itself.
He looked like a Microsoft c# garbage (collected) language shill to me anyway. Managed languages are for soydevs giving us the climate doom by bloating up memory use and draining all batteries with excessive CPU load.
@@raymundhofmann7661 Lol that was my exact thought on C#, fun fact that many famous desktop/Windows application were written in C++, as IT and intensive Windows user over 22 years I can tell from first look at the program, if it's running solid C++ or crappy C# .
I liked this video and agree to most of the facts stated. This was what I was looking for. I would like to add a few things about c++. C++ covers really wide range of hardware--ranging from 8-bit microcontoller to 64-bit intel architecture. I would recommend undergrads to go though c++ concepts atleast once to understand how C++ rides the horse (hardware.) Once you are through C++ you would intutively understand how C# is working. I, myself, started from assembly language then C & C++ to-and-fro then c#. All because of the type of applications that I was developing.
If you learn C++, learning C# will be a walk in the park. That is why I *always* tell people who have a talent for programming or a passion, go for it. Learn C and C++. Literally every single language after it, you will pick up in a week or two.
@@kuchukboromdebbarma2117 functional programming languages does require some added study, but I would argue that has less to do with programming work in practice and more to do with the theoretical. Functional programming places an artificial constraint on what you can do (or should do) and doesn't map particularly well to how computers actually work.
Currently my tech stack is only web based things but I've really wanted to dig deep into other languages and working with the hardware more directly, been trying to learn C using GBDK (a library for writing gameboy games) which has been a huge be very fun learning curve! I've also been interested in learning C# just for job opportunities really, since I think I can probably pick that up faster and it seems to more there is a variety of work you can do with it. Even though I'm not looking at C++, I'm going down a bit of a rabbit hole of information here and absolutely loving it, really enjoyed the video.
When working out what tools to use, use the tools that are right for the job! If you want RAD on a PC platform then don't shy away from learning Pascal and use Lazarus/Delphi which allows RAD for everything from Windows to Raspberry Pi. I've been coding for over 30 years and have certifications in languages like C++/C#/Java but I'll use the best tool for the task at hand. It's sad that such great languages like Pascal/Delphi fell off the radar due in general to pi$$ing competitions.
I really need to wrap my head around C++ better. I’m a game dev with experience in C# and whilst I love it I really feel like there is an upper limit to the efficiency so I am trying to learn the other side. Pointers and garbage collection are the two bits I get really lost on!
I wrote a custom memory pool system in C# that uses unmanaged memory. Leading to me using only structs, field offsets and fix pinned buffers for every game... C++ is still faster even using virtual/abstract classes. You will not regret it.
Sadly I failed my C++ class. I don't really recommend C/C++ as a first language. I recommend a higher level language then going on to lower level languages. I am now doing well in C and C++. I don't love them like Python or Go or Kotlin, But, the knowledge you get from learning these lower level languages is just addictive and makes you love and appreciate computers on a deeper level.
About generics. In C++, templates are macros run by the preprocessor before compiling code - it generates code for each occurrence. In C#, generics is a feature of the runtime with runtime representation. On the other hand, Java uses type erasure, which is more like in C++. So no runtime info about generic types. A generic type (class or struct) is either open (has placeholders - List, cannot be instantiated) or closed (has parameters set - List or List). In the case of parameters being reference types, it just have to generate one runtime representation of a closed type at runtime and reuse if for all reference types - since it handles parameters that are references with a fixed address of the same size for every type. When it comes to value types you pass the "value" as a parameter, different sizes depending on struct, and thus the runtime generates a new generic type for every variant.
C++ templates are not macros and not run by preprocessor neither, but they act like "macro" but it has sense of language grammars rather than just text replacement.
@@tomahawk5357 Generic type definitions are part of the metadata - as a ”template. Of course, the compiler is aware of the types. But the actual instantiation of a ”closed” generic class or method is at runtime with it in memory. As I tried to say before, the runtime, and subsequently the JIT compiler, creates versions optimized based on the type arguments.
@@marna_li Generics are resolved at compile time in C#. There is nothing in particular when instantiating a object from a generic class as everything is created at compile time and not at runtime. Once again, generic types are resolved at compile time not at runtime. Speaking about metadata is another subject....
Mate, you are wrong, in C# generics pretty much work the same way as C++, compiler generates code for each occurrence, as you said for C++. So it is really not a runtime thing
Really love C# after doing some android in Java then done games on Unity fell in love with C# as it just felt so similar but an easier C++. I use C++/Blueprints on UE4/5 but still prefer C# even though for FPS and realism especially UE5 is the way to go until Unity catches up, don't know why but the remote 5 not working for testing with the new starter assets and UI has hit some indie devs hard in the pocket the last few years since 2019.3. I was an avid Unity supporter until recent but I'm switching to UE5 full time now as Unity has let me and many others down chasing high end graphics and other unnecessary non indie developments. I will miss C# but still might use it for .net web/UWP/MAUI etc in future and if Unity gets the finger out and gets everything working again in support of indie devs I might have another look in a few years but never thought I'd leave Unity but they forced my hand waiting over 2 years just to do simple testing in real time, just not good enough for large 3D android games that take an hr to build just to test. Nope, so looking forward continuing my C++/Blueprints journey 👍
Both compilers/interpreters were written and are maintained by Microsoft. C# and C++ were written for different purposes, but each can be used to accomplish a given task. Why then did MS come up with a new language called C#??? What was the motivation behind that endeavor??? Can you answer that, objectively????
MS didn't invent C++. I was a product of Bell Labs (AT&T) and Bjarne Stroustrup in the early 1980s. Many companies, including MS have developed C++ compilers. As you mentioned in the question, C++ & C# are good for different purposes. C# was an ongoing effort involving VB and the untimely divorce of Sun (Java) and MS. C# and the .Net platform are primarily intended for general purpose application development including desktop and web. C++, also general purpose is better at high performance applications, but not really web.
As a non-programmer, I think someone would have to already know one of the languages (or have taken college classes) to understand most of the terminology you use. Perhaps explaining jargon a bit more would lead to a wider audience appeal.
@@chillydill4703 Agree. My first language was python in college and moving to C++ was seamless. The same went for C# and Java. Mostly the terms changed but the concept was really similar between all.
@@chillydill4703 The question is though, is this video for you guys or is it for someone like the OP? I'm asking because I have no idea and feel the same as the OP.
@@broquietstorm1266 Well, personally, I think it's for a beginner turning into an intermediate programmer who already knows the fundamentals of programming but started to explore where improvements could be done, hence looking into these languages.
Good explanation, except horrible mess with templates vs. generics. In C++ templates invariant is generated during compiling time. If it is missing, code would not link. You cannot run library with template class against some new type, because at runtime it is already too late. C#, on the other hand, also generates invariant, but at runtime. As a result, you can instantiate and execute generic class against a new type. If would be nice if this video would mention this huge difference.
Sadly I failed my C++ class. I don't really recommend C/C++ as a first language. I recommend a higher level language then going on to lower level languages. I am now doing well in C and C++. I don't love them like Python or Go or Kotlin, But, the knowledge you get from learning this lower level languages is just addictive and makes you love and appreciate computers on a deeper level.
Seems to me that C# is VERY similar to Visual FoxPRO, the language I know and love: An Object-Oriented language that is compiled into some intermediate code that kind-of interpreted with a Runtime Library. Easy to learn, very rich language designed to create interactive user-interface things in Windows and the Web and with the addition of the Record type they are getting closer to the data-centric model in Visual FoxPRO. With West Wind Web Connection for FoxPRO developing Internet Databases is a dream, and I can certainly see that I am NO missing much with C++ and C.
I started with Basic from my old Atari 800XL.. then moved to Python... then C# and now C++... iḿ pretty sure will not move anymore.. i use Unreal Engine, Qt Framework, SFML and really happy with C++.....
3:04 You have completely missed the critical part about the CLR. Yes the C# compiler creates a DLL/EXE (assembly) containing IL code. However the CLR does not actually run IL at all. Instead when a .NET DLL/EXE is first executed the CLR performs Just in Time (JIT) compilation of the IL to machine code and caches that machine code on your computer. It is this machine code that executes. The compilation to machine code is why .NET assemblies are sometimes slower to start up the first time. But from then unless you recompile your c# code, when you run that EXE/DLL it is just the existing machine code file that is being executed. In general machine code execution C# is a only slower than C++ because of the overhead of auto memory management and numerous bounds and other 'safety' checks it adds to the generated machine code. However, because the CLR is platform aware, when JIT compiling it is able to apply various platform specific optimizations to that generated machine code and so performance is improved over standard cross platform generated machine code. If you've worked with C# for some time you really need to understand this. If you're more a C++ dev . fair enough. it is not obvious unless you dig deeper which is why so many are confused. By the way, it is "intermediate language code" in the dll/exe, NOT "intermediate machine code". In context with what I explain above this is extremely confusing for new people. Please don't call it that. See: docs.microsoft.com/en-us/dotnet/standard/managed-code
I wish people would emphasise this point more. It's really important to know that C# isn't running in a VM, it runs natively, the same as C++. I see tonnes of C++ devs pile on hate for C# because they mistakenly believe it runs in a VM.
Id say its easier for any programmer to be successful if he knows about memory and how code is executed. After all, that is what is actually being programmed. Its easier to see a straightforward way to implement stuff if you know this.
@@dotnetforever why? I adore it. It’s very clear, intuitive and fast. And literally just create a project for that platform and it compiles and runs. That’s pure magic.
@@YRBYD ImGui is only a very simply UI library. Qt is a whole cross platform library, UI is a part of it you can’t compare the two. Qt it’s image processing and 3D abilities are stellar; I used it on Dunkirk and it could do everything out of the box we wanted. Very astonishing! And it’s QSockets make for a truly cross platform socket implementation which otherwise becomes a #ifndef hell. Stuff ImGui can’t do. If you just need a UI (albeit one that’s not using native OS components) ImGui will do the trick.
After 40 years of C and 25 of C++ (no C#) the choice for me is a little wider. Including C which on several large projects, I have seriously thought about using and basic C++. I have often worked with very experienced C or VHDL/Verilog programmes who struggle with C++ and have no idea about C#. They can usually transition to the very basics of C++ but get on much better with malloc/free than they do with new/delete and cannot comprehend auto or smart_ptr. It is the hiding of what is going to happen that they usually struggle with and so operator overloading is also a no no except sometimes if it is a straight forward maths type. I would also say that for a simple small app with a short runtime, it doesn't matter. One other think to remember is how much effort is it to deploy whatever runtime is required for the final executable.
@@OperationDarkside Sorry, I should have been more precise, yes, I use C++ much more than C, so it is more like 15 years of C before swapping mostly to C++ for the next 25 years but still doing some debugging and a bit of C coding, well, it has all been pre C99 as I've used VS since it came out. I really used to hate it when I would get a CV from a fresh grad claiming 3 years of C, 3 of C++, 3 of Java ...
I started learning c++ cause i had to, i loved its power, its inspiring i had the full control and understanding. But the job can be done way more easier in java or c# and they were too easy. Eventually i liked the coding part in every language. Its fun.
It's not accurate to say that C# offers no control over the GC - there are 8 different methods on offer from C# 10. Plus in many performance critical scenarios it is possible to write allocation-free code. HIghly optimised C# can approach C++ for performance while being safer and easier to write - though obviously managed code can never compete on memory use for embedded applications - that's simply not what it's designed for.
7:50, it's good to mention that lambda in C++ is just a f() inside another. It can be used as a "functor", as well as just a scope, to be used 1 or more times, granting that all variables created there will disappear once lambda returns. Overall, to active a f() you just need its address, which can be provided by the name of the f(), a pointer to it and a provided bind by STL. Hence, the name of a f() can be used as a functor too. Unfortunately, you can't force a integer value to be interpreted as a f() address, and vice-versa. 7:58, and multiple derived too. 9:25, it has an explicit syntax for interface. 1 can see some member-f() be declared as: virtual fname (its parameters) = 0; Meaning that linker should not report an error if it can't see the f() definition.
I will start a basic programming course next year and I need to choose either C++ or C# (and get the specific text book that goes with it), but I am still confused on which one to chose. I have no previous code experience, and my long term plans are try to get into IT and network positions where I work. Python is also something I should try start to learn too and maybe dig into Cisco stuff (but their courses other than expensive are not beginner friendly either). I understeand that the stuff to know in IT is infinite...but I gotta start somewhere. I've already done courses "similar"ish to the US Comptia A+ but I wish I started earlier 20 years ago. Thnx for any advice.
Focusing on memory management misses things a bit. Thinking in terms of resources is more telling. A resource are things that follow an "acquire" and "release" pattern, e.g. a file is "opened" and "closed", a mutex is "locked" and "unlocked", memory is "allocated" and "freed", etc. In C#, the only resource you get automatic cleanup for is memory (through the GC), everything else you have to manually clean up. Using statements help with that, but that is something you have to explicitly remember to use every time you use a resource type. The GC doesn't help with anything else except as a failsafe that you never actually want to rely on. In C++, all resources can be fully automated so that they are always properly cleaned up, not just memory. Doesn't matter if it is a file, socket, transaction, mutex lock, or anything else, when you hit the end of its scope it is automatically cleaned up. C# uses old and busted 1960's GC tech, C++ uses modern 1980's tech with automatic resource management.
in c++ the automated resource management is a desing pattern.... you have to do everything by yourself also c# has changed the gc very reacently and it's much better
@@rallolollo9309 The difference is that in C++, you write your destructor once and it works everywhere. In C#, you implement IDisposable once, but you also still have to explicitly use that interface everywhere you handle a resource. Otherwise you leak the resource and have to hope the garbage collector finalizes it in a timely manner. Relying on the finalizer for cleanup is very bad and can be the source of a lot of slowdown with the GC. A properly written Dispose will suppress finalization on the object to avoid the extra overhead. Calling resource cleanup a design pattern is fine, but what that pattern gives you is the key difference. The C# Dispose pattern still requires manual resource management. The C++ rule of five/rule of zero pattern gives you automatic resource management, and does so transitively so that there is zero extra work once the destructor is written.
@@oracleoftroy yhea but my point stands true, you still have to apply to that pattern everywhere, if you forget to do it you are causing serious problems. instead in c# you can let everything to the gc. My point is not as much as "how much code" do i have to write but instead will someone that never worked on c like languages mess up or not. For example if i would have to choose nowadays between c++ and rust i would probably go for rust for the same reason.
It seems with the meta data and the compilation of c# it would be a security issue as it would be possible to reverse engineer the source code from a compiled state ? I know using c++ there have been times when that might be convenient especially with devices running a program and you may either have lost or simply don't have access to the original code. But I would imagine in a proprietary business model you probably wouldn't want that.
Any program can be "de-compiled" regardless of the source language. Apps containing intellectual property or other secrets is at risk if it is accessible. It requires a more capable skillset to do that with C++ as it is more non-deterministic due to optimization and lack of symbols. But make no mistake, a hacker with your binaries can and will reverse engineer it regardless of the source language. C# decompiles readily into similar source code, however C# is optimized somewhat at compile time. Java, on the other hand, is optimized only at runtime, making decompilation much more deterministic. At best maybe some security through obscurity (which ultimately means no security). Games in the pre-internet era, written in assembly or C utilized an intentional manufacturing defect on the source CD as a sort of anti-piracy. The code often times tried to obscure the check by dynamically overwriting the code in memory then executing it to verify the disk error. A skilled developer could find the instruction and bypass the check in just a matter of minutes.
Record types are data classes generated by the compiler that are immutable. By default, they are classes and passed by reference. There is also a struct equivalent in "record struct". Yes, they are great for defining data transfer objects. Thanks to their syntax with primary constructors.
In C# everything is an object (with methods and properties), even the value types are - though they get copied when passed around and used as parameters. You can create pointers to value types in an "unsafe" context. System.ValueType, which is the base class of all structs (including primitive types) and enums, inherits from System.Object.
This is a really great video. I'm happy to report, however, in 2022, inline-declarations are starting to make header-only libraries popular. A lot of projects don't have or need separate implementation files (except, perhaps, for a single one), because of emerging initialization guarantees.
The way I look at it is there is really nothing you can do with c# that you cant do with c++. But there are things that you can do with cpp that you cant do as well wth cs. It doesnt mean that c++ is always better. There are a lot of projects where saving 1ms of speed is completely irrelevant, so you there will be no tangible benefit to c++ over c#. It is a question of whether the developer's time is more valuable than execution time. And sometimes the answer is yes.
Exactly, good points. It's a question about at which language you are most effective working at and there it also depends about what kind of problem you are solving and what libraries, etc. you have available for that problem in each language. Like a carpenter doesn't do everything with a screwrider when building a house. Instead he uses different tools for different jobs, he uses saw and hammer and etc. In programming there often comes up this not very sensible idea that everything should be done with one language.
So, if I had to choose one to learn, which would it be? What is used more nowadays? Which one is in higher demand? Are they about the same? I heard Python is the most important language nowadays.
In the programming world, people emphasize the slogan "the right tool for the job." This means there is **no** swiss-army programming language that does everything. When you ask for "the one" language to learn, then you are inherently opting into a trade off where you will be most marketable for what that single language provides and not top tier in other contexts. In short, any major language is viable. You can pick one and learn it and get a job. What you may want to ask instead is "which language is the most important for the work _I_ want to be doing?" Ergo, the hard part is actually on you. _You_ need to figure out what it is that you wish to do. After that, a simple Google search will tell you which language is best. What you are trying to do here is ask us what we think you want to do. Obviously, this approach isn't objectively reliable, unless you want superficial reassurances to comfort your indecision.
A few inaccuracies in the presentation of C++ which I believe comes from a lack of practice. For example, the value vs the reference thing only demonstrate poor understanding of what's really going on under the hood. So interesting video if you're looking for a wrap up of the myths and urban legends about C++.
Good comparison. But at the end it is like comparing apple with pear. You comparing the STL with the whole dotNet Framework. In reality when we take the cross platform capability then there will be no GUI Framework in the dotNet world. For GUI and other missing stuff in the C++ world, you can add e.g. the Qt Framework which has many features you mentioned on the dotNet side. But in the end such comparisons are not very use full. It always depends on the problem you like to solve and which resources you have available.
The GUI issue will be solved eventually I think. It isn't a fundamental limitation of dotnet, there's just been a lack of interest in solving some fundamentals correctly. QtSharp's technique for emulating name mangled object code is about the best hack for the moment. It's a symptom of a deeper problem Microsoft has been trying and failing to solve for the last 30 years, because their basic approach is always the same - wrap C++ in an IDL type intermediary like DCOM / CORBA. IDLs are interesting but there's zero interest in building on that in the open source world. I don't think the C++/CLI approach is the right one either. Microsoft was not ambitious enough in building out meta-programming facilities with Roslyn so it fell way short of what it could have been. That's ultimately why you have no GUI, and no successful dotnet ports of mainstream languages.
Learn all of them! ;D Seriously - it really doesn't matter - maybe your job prospects would dictate the starting point. Programming is much, much more that language. The more languages you are fluent in, the better software engineer you will be in all of them. (plus, languages come and go)
7:24 uhm..functional programming is something totally different (C++ and C# are imperative languages). Of course you could say that since C++ template metaprogramming is Turing-complete, you can in fact use templates to write functional programs, but they will be "executed" by the compiler.
Agreed C++/C#/Java are not primarily functional. However, the ability to treat a function as an object is an important tool in realizing dependency inversion.
While it is true that you can compile C# programs for non-M$ platforms, it is generally a terrible experience and you are limited to older versions of C#. If you don't want to develop for M$ platforms (i.e. Windows and XBox) I would suggest not using C#, personally I would suggest Kotlin as a good alternative to C#.
@@tordjarv3802 The headaches you have running JVM based code everywhere isn't too dissimilar from running .NET based code everywhere. In the end, they're both rather easy to run cross platform nowadays, but each have their flaws.
An inexperience programmer can tell you this. C++ is cloers to C in its nature. C# is closer to Java in its nature. The only thing both programming languages have in common is the letter C.
3:10 No! This isn't true, and it's an important distinction and a common misconception (especially among C++ programmers, for some reason). C# compiles to native machine code, exactly the same as C++. The only difference is that it does it at runtime using the CLR's JIT compiler. There's no VM involved. All C# code runs directly on the hardware, exactly like C++. It just has extra hooks to trigger the compiler (including potentially multiple times).
Kind-of the definition of virtual machine. The CLR (as well as the Java VM) does cache the native translation at runtime and .Net applications are certainly fast. But the whole idea of "managed code" is that the application runs in a runtime that is on the lookout for common problems like null references and index out of bounds, etc. That does add to execution time. Not saying it's good or bad.
@@McCulloughAssociates It's not though. By that logic, C++ caches the "native translation" when you compile. In that regard, C# is the same as C++ except that it finishes the compilation at runtime instead of ahead of time. It also doesn't run "in" a runtime. It's executed _by_ the CLR, but it's running natively, on bare metal, exactly the same as C++. The CLR is an extra step but not an extra layer. Uncompiled methods are compiled to stubs that call back into the CLR. Once the JIT has completed compilation, it modifies the stub to point to the compiled code and returns execution to the program. The checks and guards (like array bounds checking, which, arguably, a C++ programmer should be doing anyway) are compiled in. It's still native code, just with built-in safeguards. It's also worth noting that the safeguards are not even added when it's statically provable they're not needed. I can't find any definition of VM that fits what C# and the CLR are. It's just a different way of compiling native machine code. I'm not familiar with Java but I would suggest that JVM is a misnomer.
This is very good. Too many C++ vs. this or that comparisons usually start with the ridiculous C++ is old and dangerous and should be abandoned kind of stuff.
I coded in C++ back when it was new and dangerous! It is only dangerous when developers are inexperienced or inept. Modern C++ is even easier to code bug free!
Gosh.....I am so discouraged, but won't give up trying to learn one of those languages. I am sure this was helpful for someone that have more than a basic idea of coding. Maybe one day I will understand this video in two years. :)
to program video games c++ or c# is recommended. I already have basics in programming so I have to choose a language and I don't know which one to choose. :(
C++ vs. C# in the gaming world is kind of a misnomer. Use whichever one you're more comfortable with, or whichever one your game engine makes available to you. In Unity, that's probably going to be C#, Unreal C++ (or blueprints), etc. If you're building one from scratch and are equally fluent in both languages, C++ will give you slightly better performance at the expense of increased code verbosity, while the C# compiler will give you much easier-to-interpret error messages and the language paradigm itself will give you improved code brevity. In the end though, it doesn't really matter to anyone outside of the development team. I've seen games created in Lua or Python that performed better than similar ones written in C++, and it all comes down to your preference. I've also seen people make games in C# to lay out the essential gameplay framework, then switch to hosting that game library within C++ for the more advanced rendering, networking, and compiler optimizations it offers.
You choose the one being used by the engine you want to use. Unity used C# for scripting, Unreal uses C++ for scripting, other engines use other languages or in many cases offer their own in-house language.
While there are very good points here, most of them are not quite true or accurate. Still, gives a better than normal breakdown of the two, even if most of the information is not quite true, it is accurate enough for most purposes of the normal novice programmer. Before C++ 20, the choice of which one to learn first was really easy win for C#, now I would consider them both equally valid based on your preferences and what sort of programming you want to do. C# is a hybrid and extremely flexible language only limited by the skill of the user, it is FAR less opinionated than people think it is. You can do almost anything a C++ does with C# and with enough skill, can in some scenarios even achieve faster speeds than C++ due to the ability adapt and optimize and recompile some parts of the code even at runtime based on detected patterns. Also C# can use C/C++ libraries as needed as part of C#, and C# can actually decide when the code is compiled, it doesn't have to be compiled at runtime, but can also be precompiled as native machine code at compile time
The very idea to place these two in the same sentence is stupid. They serve diametrically different purposes after all (despite the fact that it is possible to do almost anything in C++ this does not put it in the same category). C++ is low level language and can target not only the "metal", but it is still a low level language supporting higher level abstractions one can use as much as he wants or not use them and keep as close to the C level in the other extreme, but the main point is C++ is not bound to a bulky runtime without which C# cannot exist. So, this angers me - all those attempts to compare these as languages and not as totally different things in the programming ecosystem.
"C++ is not bound to a bulky runtime without which C# cannot exist." Bzzt wrong thanks for playing. Though, yes, in practice C# isn't there yet. There's considerable work yet to be done to make full independence from separate runtime components possible.
@Michael Elfial The specific language doesn't matter much here. A better question is: "Can you compile a useful subset of the IL to a traditional binary that only makes use of a static linked runtime and ordinary dynamic libs that don't need jitting?" Clearly the answer is at least "kinda" because that's been possible for quite a while now. See the mono project's AoT compiler documentation for details, particularly the "full AoT" mode. Naturally, you lose functionality that depends on having the full JIT available particularly anything that requires `System.Reflection.Emit` isn't going to work. As a side-note, I don't think fully eliminating the JIT is actually a worthy goal. I do not condone companies that want to enforce total lockdown of W^X on their systems and don't think we should appease them by crippling our compilers for that purpose. Those companies have hidden agendas. They're using their usual tactics to disguise anti-consumer practices as security concerns. I've been running selective W^X on my hardenedBSD and PaX systems since long before it was possible on any of these companies platforms. And now all of a sudden they're concerned for our security...
Yes, then it would just be called C++. However, there are languages that can do what C++ does, C# being one of them, since it is actually extremely close related to it when run in unsafe native mode and precompiled to native at compile time
Great question. In C++, by default, a variable is large enough to hold the data (value) and a copy is passed to functions. emp in the line below is all the memory for employee data and copies are made if passed or assigned in c++. That statement in c# declares a reference, the equivalent of Employee* in C++. C# isn’t pure reference based as primitives have value semantics. Employee emp; In C#, emp is a null pointer (reference) and an object must be allocated from the heap via new. Only the reference is passed or assigned, not copies of the object. Most functions in C++ are defined to pass references or pointers to avoid the cost of making copies, but that requires explicit syntax (* or &).
Thanks for the comparison,having used all three extensively. I agree with most of it. When it comes to learning, Pascal is best (i.e. Delphi), which gives you the best of C++ & C# worlds. This is weird because the designer of C# also designed Delphi. C# could have been great but due to M$ mandates is CRAP!
Anders Hjelsberg also designed Turbo Pascal which is/was a big compiler on PC in the 80s-90s before Delphi. He is also one of the creators or Typescript. And claming C# is crap without stating its you personal opinion is a bit over the top since its in the top 10 most popular languages and used in thousands upon thousands of projects. If it was really crap it would not be that big, no matter what personal preferences it disagrees with :P
*want to become a programmer and write code that runs faster with less memory go for c/c++ else go for any of the script writers language c#, java, Borneo, Sumatra and what not*
Wow this really goes over stuff really well. I want to point out the C# does actaully have a tiny amount of control over the GC as you can finalize things. Now this does not guarentee like... anything but you can finalize something and clean up resources in a "destructor" in C#. C# also supports pointers and memory management through unsafe code but no one should really be using it unless they are a niche exception.
thank you daddy, i miss you
@Jan What do you mean?
C# is the most beautiful language for me so that after 5 years of using it, I have no intent to switch to other languages.
Can you help me with one thing?
A desktop application that I wrote in C sharp would work on my system. But would not work on many other computers using the same OS. How does one deploy a C Sharp application?
I love the passion everyone has for their favorite language! Just as a bit of background, My first C++ project was in 1985 using CFront and my last was completed just a few weeks ago - a rather large application for the US military. C&C++ are my first loves as those were my first languages. I have built dozens of projects over the decades in C++, C#, and Java and I find all three to be quite capable and useful and enjoy all. I also have comprehensive training courses on all three platforms with thousands of students. Point is, I know and use all 3 and really have no preference. We left 30 minutes of video on the cutting room floor when making this, so we didn't cover every detail in this short video. Our goal wasn't to declare a winner, but to provide an answer to a very common question.
I love how Java and C# are so similar. I learned to program in Java, and was able to pickup C# very quickly, and love working with both. I’ve only dabbled in C++ in my side Arduino/Raspberry Pi projects, but hope to become proficient using it in my spare time. Thanks for the great information!
@@ryanrivera9623 I'm no expert but the reason why you could pick it up so fast was because of the same concept of the two languages: they both run on a virtual machine, one is JVM while another is CLR.
Hey what was your project for the US military
I've been a C# programmer for a few years, but I am switching to C++ because C++ can be portable and can be interfaced with other languages. Microsoft just can't provide tools that I want.
Thanks for the perspective. I have been struggling in deciding between C# for applications/backend and C++ for graphics rendering, maybe I will be fine with using both. But I feel I need to make a decision in order to facilitate efficient learning. I'm not a beginner but feel my progress is slowed by my tendency to jump between the two. Not sure if it is healthy.
As an amateur musician, I hear C sharp and think: "isn't that the same as D flat?"
personally, I though learning the programming rules for C++ was a easier than C#. But once I learned each language I found C# was a lot to use because of the reasons you mentioned.
To your point about C++ being useful for games, that's mostly true! If you're building an engine, or making a game from scratch C++'s performance is practically essential. I've used C# far more often for games though, since it's supported by engines like Unity and Godot, and tools like LINQ and interfaces can help manage complex collections of objects and their interactions. I like my engines in C++, and my game code in C#.
Depends on what kind of game/engine. If its its advanced/high performance 3D then yes I would go with C++. But if its just a 2D or basic 3D I would go with C# for the ease of use.
Good point. C++ Game Engines can be multiplatform since they use multiplatform gui code, while the c# doesn't provide the GUI code so it can be used everywhere including linux (.NET GUI does not work properly in Linux, even with WINE... only if you're lucky). Portability and ease of use, that's a great combination.
Recently Godot finally made C# and their own language feature identical, making C# ever better choice for 2d games.
As C++ programmer, I really like that it's represented in a correct way. That's really rare.
Yes, I agree as a C++ devoted learner it is often misunderstood and underrated and newer languages like Rust are being overrated.
Any job these days is going to require C#, Java Script and Python. C++, while a superior language for sheer performance (in the right hands), does not lend itself well to the "average" code monkey. It's too easy for them to hang themselves with it. For that reason, it you have the honest ability to properly deal with C++ (and C) they are certainly nice to have on your resume and will probably allow to work your way into a higher paying job.
Not necessarily. I work for a multi-national software house, and we don't touch C#. Sadly for me, because C# is streets ahead of java for desktop application development. I hate java.
I'm late in here. Thanks for this comparison. As a software developer working more than 2 decades with C++ and C# I can agree with your speech. Both languages are similar but do have subtle differences. As a guide I would suggest the following: For UI use C# and technologies that are best for the task. For near-hardware-work use C++. To close the gap between C# and C++ use C++/CLI. For implementing communication protocols use what ever you want - there are so many available...
Which language helps to understand computer better?
@@dharanibala8443C
@@dharanibala8443 When it comes to abstraction starting from most abstract: C# > C++ > C > Assembler > Binary
@@dharanibala8443 C
I took C++ and VB in school and taught myself C#, I found that C# was easier to learn; its like C++ and VB had a baby. You get the power of C++ and the Graphical interface like VB all in one. I have been programming in C# for about 12 years now from game programming to databases and other apps at work.
The question isn't Which to Learn, but Rather which to Learn First. Learn 1, you can Learn the Other in 30 days. I've never Learnt PHP, however since I know C/C++ and C#, I can easily understand PHP.
The question, which First? C#. C# is like Visual Basic. It is forgiving if you make mistakes. After C#, you can learn C/C++. You'll have to learn a little extra to see how it works at a lower level, closer to the hardware.
I learned Visualbasic back in highschool. Never used it. So going with C# was a good place to start for me.
It doesn't have to be identical. But if certain things crossover it makes the much less frustrating.
While I haven't touched C(++) I can see how that would be the same for that language and C#.
what if im in highschool , i cant learn a language in 30days. So i learn c++ because it runs on android and c# doesnt. And i want to program for android.
@@sbypasser819 c# can be used for android and IOS apps even. Might not do what you want to do. But C# is multi platform. Check out Xamarin for Android specifically.
But ultimately you want to learn C++ anyway so I'd say, if you are willing to start with that and you are still in high school. Please stay with C++. Especially if you want to do computer science at university later on.
True and the answer is assembly. I still build upon those 6502 days. And I still can relate performance issues back because of that understanding of assembly - although with x64 it’s not as trivial with that terrible extensive opcodes set.
You can learn syntax of c# in 30 days but it will take years to learn the vast library it has. C++ your more on your own. Good or bad
I startet with C# because of my employer, but soon got hooked on the performance C++ offered. Some C# frameworks were terribly slow back then. Especially .NET Entity Framework. Almost all private projects are C++ now except where I'm forced to use other languages. The only thing I really miss are human readable compiler errors. Especially template-related error messages can be almost unreadable.
You might really enjoy Rust.
What compiler do you use?
This was interesting. But I think which language to learn depends more on 1) the OS environment you are tasked with developing apps for, 2) why you are learning the language, and 3) what you hope to do with it.
In the Linux world you are traditionally developing in C/C++ (or a higher level language) not C#, though that is at least possible now. In the Windows world, at least in the case of apps, C++ is rarely used anymore and the scale tips mightily to C#.
Professional programmers will tend to want to learn those languages they enjoy and bring them the best market opportunities. Companies will tend to develop in the languages which make their IT staff most productive. On both these counts I think C# is vastly superior, at least in the Windows world, which, after all is the environment it was created for.
For developing and shipping a product c# is the clear winner unless your application dictates you use c++
very good comparison. regarding the line "Programmer has no control over GC", while that's mostly true,
the programmer can force the garbage collector to run by calling GC.Collect().
True and .net provides better control than Java. I wouldn’t recommend explicit gc except in very unusual circumstances.
@McCullough & Associates yea it's not recommended but it's still used in cases where the programmer did some action that caused a lot of memory to be unused and unreachable and he wants the GC to free those memory allocations from the RAM at that point, so he calls GC.Collect() and after those memory allocations are freed the app will consume less memory and run faster since the GC, which freezes all threads (except for Gen2 collection when Background GC is performed) to check all memory allocations and free unreachable ones, will have much less memory allocations to review, thus the app's threads will be frozen for a shorter time, thus the app will run faster.
the best control you have over GC is structuring things to not need it very much. dont do mindless allocations of stuff, make good use of value types, so on, so forth. There's all sorts of stuff in c# that enables you to work around the GC, just look into the fixed keyword as 1 example.
Interesting, and a good explanation. I've prgramed in both C++ and C#, and have found myself frustrsted at times with C#. I've ran into a few situations were what would be simple in C++ was not possible in C#.
Example: I had to modify an external library to do something that actually requied me to create a thread in it. The thread needed to finish its job before any application using it shutdown or the data would be lost. In C++ the thread would have to complete its job before it would stop processing. In C# the thread would just stop, regardless of its state at the time. Every mechanism, on paper, that was supposed to allow me some control over the thread in C# was bypast completely.
Extremely well done. From my admittedly short experience with C#, I find it gives you a ton of tools to do everything. C++ gives you the machinery to make the tools. Sure C++ doesn't have a webapi out of the box, but you can make more meaningful abstractions with C++ than C#.
That, and C# is a OO language first and C++ is exactly as OO as it is functional.
I learned C# first since it was the language Unity using which I use for making my games.
4:20, C++ hasn't the interface keyword, but has virtual, override, final and '= 0' for the 1st f() in an "interface". It has also the slowness that only an interface can provide. For strongly typed as parameters and returning, it's pretty easy to code them by yourself.
5:50, oh, my! You didn't mention the containers C++ has in its standard library, all of them managing automatically their own memory, making memory leakings a challenge. And for raw pointers, there's always the option to wrap them into a class, making your own smartpointer, if this last 1 was not an option itself.
He looked like a Microsoft c# garbage (collected) language shill to me anyway. Managed languages are for soydevs giving us the climate doom by bloating up memory use and draining all batteries with excessive CPU load.
@@raymundhofmann7661 Lol that was my exact thought on C#, fun fact that many famous desktop/Windows application were written in C++, as IT and intensive Windows user over 22 years I can tell from first look at the program, if it's running solid C++ or crappy C# .
I liked this video and agree to most of the facts stated. This was what I was looking for. I would like to add a few things about c++. C++ covers really wide range of hardware--ranging from 8-bit microcontoller to 64-bit intel architecture. I would recommend undergrads to go though c++ concepts atleast once to understand how C++ rides the horse (hardware.) Once you are through C++ you would intutively understand how C# is working. I, myself, started from assembly language then C & C++ to-and-fro then c#. All because of the type of applications that I was developing.
If you learn C++, learning C# will be a walk in the park. That is why I *always* tell people who have a talent for programming or a passion, go for it. Learn C and C++. Literally every single language after it, you will pick up in a week or two.
Not really
Language like elixir requires its own set of mindset
@@kuchukboromdebbarma2117 functional programming languages does require some added study, but I would argue that has less to do with programming work in practice and more to do with the theoretical. Functional programming places an artificial constraint on what you can do (or should do) and doesn't map particularly well to how computers actually work.
The hardest part of learning C# (as a former C developer myself) is learning all the damn libraries needed for my day job
@@nontraditionaltech2073 You have google and microsoft docs for that.
@@andresvallelisboa5511 all day, every day lol
Currently my tech stack is only web based things but I've really wanted to dig deep into other languages and working with the hardware more directly, been trying to learn C using GBDK (a library for writing gameboy games) which has been a huge be very fun learning curve! I've also been interested in learning C# just for job opportunities really, since I think I can probably pick that up faster and it seems to more there is a variety of work you can do with it. Even though I'm not looking at C++, I'm going down a bit of a rabbit hole of information here and absolutely loving it, really enjoyed the video.
When working out what tools to use, use the tools that are right for the job! If you want RAD on a PC platform then don't shy away from learning Pascal and use Lazarus/Delphi which allows RAD for everything from Windows to Raspberry Pi. I've been coding for over 30 years and have certifications in languages like C++/C#/Java but I'll use the best tool for the task at hand. It's sad that such great languages like Pascal/Delphi fell off the radar due in general to pi$$ing competitions.
Hi!
6:01 - In seashark there is no way to alter garbage collection indeed, however ~destructors are worth mentioning.
I really need to wrap my head around C++ better. I’m a game dev with experience in C# and whilst I love it I really feel like there is an upper limit to the efficiency so I am trying to learn the other side. Pointers and garbage collection are the two bits I get really lost on!
I wrote a custom memory pool system in C# that uses unmanaged memory.
Leading to me using only structs, field offsets and fix pinned buffers for every game...
C++ is still faster even using virtual/abstract classes.
You will not regret it.
Sadly I failed my C++ class. I don't really recommend C/C++ as a first language. I recommend a higher level language then going on to lower level languages. I am now doing well in C and C++. I don't love them like Python or Go or Kotlin, But, the knowledge you get from learning these lower level languages is just addictive and makes you love and appreciate computers on a deeper level.
Skill issue
About generics. In C++, templates are macros run by the preprocessor before compiling code - it generates code for each occurrence. In C#, generics is a feature of the runtime with runtime representation. On the other hand, Java uses type erasure, which is more like in C++. So no runtime info about generic types.
A generic type (class or struct) is either open (has placeholders - List, cannot be instantiated) or closed (has parameters set - List or List). In the case of parameters being reference types, it just have to generate one runtime representation of a closed type at runtime and reuse if for all reference types - since it handles parameters that are references with a fixed address of the same size for every type.
When it comes to value types you pass the "value" as a parameter, different sizes depending on struct, and thus the runtime generates a new generic type for every variant.
In C# generics are resolved at compile time, not at runtime.
C++ templates are not macros and not run by preprocessor neither, but they act like "macro" but it has sense of language grammars rather than just text replacement.
@@tomahawk5357 Generic type definitions are part of the metadata - as a ”template. Of course, the compiler is aware of the types.
But the actual instantiation of a ”closed” generic class or method is at runtime with it in memory.
As I tried to say before, the runtime, and subsequently the JIT compiler, creates versions optimized based on the type arguments.
@@marna_li Generics are resolved at compile time in C#. There is nothing in particular when instantiating a object from a generic class as everything is created at compile time and not at runtime. Once again, generic types are resolved at compile time not at runtime. Speaking about metadata is another subject....
Mate, you are wrong, in C# generics pretty much work the same way as C++, compiler generates code for each occurrence, as you said for C++. So it is really not a runtime thing
Really love C# after doing some android in Java then done games on Unity fell in love with C# as it just felt so similar but an easier C++. I use C++/Blueprints on UE4/5 but still prefer C# even though for FPS and realism especially UE5 is the way to go until Unity catches up, don't know why but the remote 5 not working for testing with the new starter assets and UI has hit some indie devs hard in the pocket the last few years since 2019.3. I was an avid Unity supporter until recent but I'm switching to UE5 full time now as Unity has let me and many others down chasing high end graphics and other unnecessary non indie developments. I will miss C# but still might use it for .net web/UWP/MAUI etc in future and if Unity gets the finger out and gets everything working again in support of indie devs I might have another look in a few years but never thought I'd leave Unity but they forced my hand waiting over 2 years just to do simple testing in real time, just not good enough for large 3D android games that take an hr to build just to test. Nope, so looking forward continuing my C++/Blueprints journey 👍
Both compilers/interpreters were written and are maintained by Microsoft. C# and C++ were written for different purposes, but each can be used to accomplish a given task. Why then did MS come up with a new language called C#??? What was the motivation behind that endeavor??? Can you answer that, objectively????
MS didn't invent C++. I was a product of Bell Labs (AT&T) and Bjarne Stroustrup in the early 1980s. Many companies, including MS have developed C++ compilers. As you mentioned in the question, C++ & C# are good for different purposes. C# was an ongoing effort involving VB and the untimely divorce of Sun (Java) and MS.
C# and the .Net platform are primarily intended for general purpose application development including desktop and web. C++, also general purpose is better at high performance applications, but not really web.
As a non-programmer, I think someone would have to already know one of the languages (or have taken college classes) to understand most of the terminology you use. Perhaps explaining jargon a bit more would lead to a wider audience appeal.
Well, what you are referring to is basic understanding of programming in general, regardless what language it is (python, java, javascript etc..).
@@chillydill4703 Agree. My first language was python in college and moving to C++ was seamless. The same went for C# and Java. Mostly the terms changed but the concept was really similar between all.
@@vortex_7574 Yep agree!
@@chillydill4703 The question is though, is this video for you guys or is it for someone like the OP? I'm asking because I have no idea and feel the same as the OP.
@@broquietstorm1266 Well, personally, I think it's for a beginner turning into an intermediate programmer who already knows the fundamentals of programming but started to explore where improvements could be done, hence looking into these languages.
Good explanation, except horrible mess with templates vs. generics. In C++ templates invariant is generated during compiling time. If it is missing, code would not link. You cannot run library with template class against some new type, because at runtime it is already too late. C#, on the other hand, also generates invariant, but at runtime. As a result, you can instantiate and execute generic class against a new type. If would be nice if this video would mention this huge difference.
I started with C++ during high school 😂 Then I did C# for fun and enjoyed it more
Me too
Sadly I failed my C++ class. I don't really recommend C/C++ as a first language. I recommend a higher level language then going on to lower level languages. I am now doing well in C and C++. I don't love them like Python or Go or Kotlin, But, the knowledge you get from learning this lower level languages is just addictive and makes you love and appreciate computers on a deeper level.
Seems to me that C# is VERY similar to Visual FoxPRO, the language I know and love: An Object-Oriented language that is compiled into some intermediate code that kind-of interpreted with a Runtime Library. Easy to learn, very rich language designed to create interactive user-interface things in Windows and the Web and with the addition of the Record type they are getting closer to the data-centric model in Visual FoxPRO. With West Wind Web Connection for FoxPRO developing Internet Databases is a dream, and I can certainly see that I am NO missing much with C++ and C.
I spent sometime converting a C++ CLI service over to C#. In terms of syntax, I'll take C# over C++ CLI every time.
I started with Basic from my old Atari 800XL.. then moved to Python... then C# and now C++... iḿ pretty sure will not move anymore.. i use Unreal Engine, Qt Framework, SFML and really happy with C++.....
I've been programming in C# for long time, so I choose C#, both are amazing, but for my opinion C# is the best!!!
you have quite a good control over GC, it just makes no sense, and afair doesn't work in debug where you would typically want to play with it.
Actually you can force GC to collect earlier if you need in C#
3:04 You have completely missed the critical part about the CLR. Yes the C# compiler creates a DLL/EXE (assembly) containing IL code. However the CLR does not actually run IL at all. Instead when a .NET DLL/EXE is first executed the CLR performs Just in Time (JIT) compilation of the IL to machine code and caches that machine code on your computer. It is this machine code that executes. The compilation to machine code is why .NET assemblies are sometimes slower to start up the first time. But from then unless you recompile your c# code, when you run that EXE/DLL it is just the existing machine code file that is being executed.
In general machine code execution C# is a only slower than C++ because of the overhead of auto memory management and numerous bounds and other 'safety' checks it adds to the generated machine code. However, because the CLR is platform aware, when JIT compiling it is able to apply various platform specific optimizations to that generated machine code and so performance is improved over standard cross platform generated machine code.
If you've worked with C# for some time you really need to understand this. If you're more a C++ dev . fair enough. it is not obvious unless you dig deeper which is why so many are confused.
By the way, it is "intermediate language code" in the dll/exe, NOT "intermediate machine code". In context with what I explain above this is extremely confusing for new people. Please don't call it that. See: docs.microsoft.com/en-us/dotnet/standard/managed-code
C# also compiles to native instructions or AOT.
You are totally correct. We didn't want to dive that deep in a short presentation.
Very well put
I wish people would emphasise this point more. It's really important to know that C# isn't running in a VM, it runs natively, the same as C++. I see tonnes of C++ devs pile on hate for C# because they mistakenly believe it runs in a VM.
Id say its easier for any programmer to be successful if he knows about memory and how code is executed. After all, that is what is actually being programmed. Its easier to see a straightforward way to implement stuff if you know this.
C++ I want lean binaries without , no runtime environments and that’s truly cross platform. C++ with Qt is a golden combo.
no... at all. Qt is a golden disaster.
@@dotnetforever why? I adore it. It’s very clear, intuitive and fast. And literally just create a project for that platform and it compiles and runs. That’s pure magic.
I wouldn't call it very clear and intuitive tho. Imgui takes the spot for me in this category
@@YRBYD ImGui is only a very simply UI library. Qt is a whole cross platform library, UI is a part of it you can’t compare the two. Qt it’s image processing and 3D abilities are stellar; I used it on Dunkirk and it could do everything out of the box we wanted. Very astonishing!
And it’s QSockets make for a truly cross platform socket implementation which otherwise becomes a #ifndef hell.
Stuff ImGui can’t do. If you just need a UI (albeit one that’s not using native OS components) ImGui will do the trick.
After 40 years of C and 25 of C++ (no C#) the choice for me is a little wider. Including C which on several large projects, I have seriously thought about using and basic C++.
I have often worked with very experienced C or VHDL/Verilog programmes who struggle with C++ and have no idea about C#. They can usually transition to the very basics of C++ but get on much better with malloc/free than they do with new/delete and cannot comprehend auto or smart_ptr. It is the hiding of what is going to happen that they usually struggle with and so operator overloading is also a no no except sometimes if it is a straight forward maths type.
I would also say that for a simple small app with a short runtime, it doesn't matter.
One other think to remember is how much effort is it to deploy whatever runtime is required for the final executable.
For a second I thought you'd have to have 65 years of programming experience then. Even if you started at the age of 10 you'd be 75 now 😆
@@OperationDarkside Sorry, I should have been more precise, yes, I use C++ much more than C, so it is more like 15 years of C before swapping mostly to C++ for the next 25 years but still doing some debugging and a bit of C coding, well, it has all been pre C99 as I've used VS since it came out.
I really used to hate it when I would get a CV from a fresh grad claiming 3 years of C, 3 of C++, 3 of Java ...
@@trickysoft It's all good :-)
I have autism, so I take things very literally quite often. This sometimes leads to hilarious misunderstandings.
I started learning c++ cause i had to, i loved its power, its inspiring i had the full control and understanding. But the job can be done way more easier in java or c# and they were too easy. Eventually i liked the coding part in every language. Its fun.
It's not accurate to say that C# offers no control over the GC - there are 8 different methods on offer from C# 10. Plus in many performance critical scenarios it is possible to write allocation-free code. HIghly optimised C# can approach C++ for performance while being safer and easier to write - though obviously managed code can never compete on memory use for embedded applications - that's simply not what it's designed for.
7:50, it's good to mention that lambda in C++ is just a f() inside another. It can be used as a "functor", as well as just a scope, to be used 1 or more times, granting that all variables created there will disappear once lambda returns.
Overall, to active a f() you just need its address, which can be provided by the name of the f(), a pointer to it and a provided bind by STL. Hence, the name of a f() can be used as a functor too. Unfortunately, you can't force a integer value to be interpreted as a f() address, and vice-versa.
7:58, and multiple derived too.
9:25, it has an explicit syntax for interface. 1 can see some member-f() be declared as:
virtual fname (its parameters) = 0;
Meaning that linker should not report an error if it can't see the f() definition.
Thanks for your comments. We could have spent an hour digging into the details!
do one comparing C# and F#
Can you do a comparison between C; C++; Rust; Zig; and an assembly -- which is faster?
I would compare C# and Java. Why? You pointed that, C# as Java using JIT compiler.
I will start a basic programming course next year and I need to choose either C++ or C# (and get the specific text book that goes with it), but I am still confused on which one to chose.
I have no previous code experience, and my long term plans are try to get into IT and network positions where I work. Python is also something I should try start to learn too and maybe dig into Cisco stuff (but their courses other than expensive are not beginner friendly either). I understeand that the stuff to know in IT is infinite...but I gotta start somewhere. I've already done courses "similar"ish to the US Comptia A+ but I wish I started earlier 20 years ago.
Thnx for any advice.
Good thumbnail, good explanation.....
Focusing on memory management misses things a bit. Thinking in terms of resources is more telling. A resource are things that follow an "acquire" and "release" pattern, e.g. a file is "opened" and "closed", a mutex is "locked" and "unlocked", memory is "allocated" and "freed", etc.
In C#, the only resource you get automatic cleanup for is memory (through the GC), everything else you have to manually clean up. Using statements help with that, but that is something you have to explicitly remember to use every time you use a resource type. The GC doesn't help with anything else except as a failsafe that you never actually want to rely on.
In C++, all resources can be fully automated so that they are always properly cleaned up, not just memory. Doesn't matter if it is a file, socket, transaction, mutex lock, or anything else, when you hit the end of its scope it is automatically cleaned up.
C# uses old and busted 1960's GC tech, C++ uses modern 1980's tech with automatic resource management.
in c++ the automated resource management is a desing pattern.... you have to do everything by yourself also c# has changed the gc very reacently and it's much better
@@rallolollo9309 The difference is that in C++, you write your destructor once and it works everywhere. In C#, you implement IDisposable once, but you also still have to explicitly use that interface everywhere you handle a resource. Otherwise you leak the resource and have to hope the garbage collector finalizes it in a timely manner. Relying on the finalizer for cleanup is very bad and can be the source of a lot of slowdown with the GC. A properly written Dispose will suppress finalization on the object to avoid the extra overhead.
Calling resource cleanup a design pattern is fine, but what that pattern gives you is the key difference. The C# Dispose pattern still requires manual resource management. The C++ rule of five/rule of zero pattern gives you automatic resource management, and does so transitively so that there is zero extra work once the destructor is written.
@@oracleoftroy yhea but my point stands true, you still have to apply to that pattern everywhere, if you forget to do it you are causing serious problems. instead in c# you can let everything to the gc. My point is not as much as "how much code" do i have to write but instead will someone that never worked on c like languages mess up or not. For example if i would have to choose nowadays between c++ and rust i would probably go for rust for the same reason.
It seems with the meta data and the compilation of c# it would be a security issue as it would be possible to reverse engineer the source code from a compiled state ? I know using c++ there have been times when that might be convenient especially with devices running a program and you may either have lost or simply don't have access to the original code. But I would imagine in a proprietary business model you probably wouldn't want that.
Any program can be "de-compiled" regardless of the source language. Apps containing intellectual property or other secrets is at risk if it is accessible. It requires a more capable skillset to do that with C++ as it is more non-deterministic due to optimization and lack of symbols. But make no mistake, a hacker with your binaries can and will reverse engineer it regardless of the source language.
C# decompiles readily into similar source code, however C# is optimized somewhat at compile time. Java, on the other hand, is optimized only at runtime, making decompilation much more deterministic.
At best maybe some security through obscurity (which ultimately means no security).
Games in the pre-internet era, written in assembly or C utilized an intentional manufacturing defect on the source CD as a sort of anti-piracy. The code often times tried to obscure the check by dynamically overwriting the code in memory then executing it to verify the disk error. A skilled developer could find the instruction and bypass the check in just a matter of minutes.
Record types are data classes generated by the compiler that are immutable. By default, they are classes and passed by reference. There is also a struct equivalent in "record struct". Yes, they are great for defining data transfer objects. Thanks to their syntax with primary constructors.
ua-cam.com/video/PZpKv8wfIZ4/v-deo.html
@@McCulloughAssociates
In C# everything is an object (with methods and properties), even the value types are - though they get copied when passed around and used as parameters. You can create pointers to value types in an "unsafe" context. System.ValueType, which is the base class of all structs (including primitive types) and enums, inherits from System.Object.
Just some clarification, when reference types are passed as parameters, the objects they reference aren't copied, just the references to the objects.
> In C# everything is an object-
Pointers themselves are not objects
This is a really great video.
I'm happy to report, however, in 2022, inline-declarations are starting to make header-only libraries popular. A lot of projects don't have or need separate implementation files (except, perhaps, for a single one), because of emerging initialization guarantees.
Looks like commertial for c sharp
The way I look at it is there is really nothing you can do with c# that you cant do with c++. But there are things that you can do with cpp that you cant do as well wth cs.
It doesnt mean that c++ is always better. There are a lot of projects where saving 1ms of speed is completely irrelevant, so you there will be no tangible benefit to c++ over c#.
It is a question of whether the developer's time is more valuable than execution time. And sometimes the answer is yes.
Exactly, good points. It's a question about at which language you are most effective working at and there it also depends about what kind of problem you are solving and what libraries, etc. you have available for that problem in each language. Like a carpenter doesn't do everything with a screwrider when building a house. Instead he uses different tools for different jobs, he uses saw and hammer and etc. In programming there often comes up this not very sensible idea that everything should be done with one language.
I've started learning c# only after crossplatform version of dot net was populated!!!
make a video about your favorite c++ framework
Missing : C# easily reverse engineered and get the source code back but not C++(CLI)
it was not missed. covered about half way in.
watch the video next time
So, if I had to choose one to learn, which would it be? What is used more nowadays? Which one is in higher demand? Are they about the same? I heard Python is the most important language nowadays.
In the programming world, people emphasize the slogan "the right tool for the job." This means there is **no** swiss-army programming language that does everything. When you ask for "the one" language to learn, then you are inherently opting into a trade off where you will be most marketable for what that single language provides and not top tier in other contexts.
In short, any major language is viable. You can pick one and learn it and get a job. What you may want to ask instead is "which language is the most important for the work _I_ want to be doing?"
Ergo, the hard part is actually on you. _You_ need to figure out what it is that you wish to do. After that, a simple Google search will tell you which language is best. What you are trying to do here is ask us what we think you want to do. Obviously, this approach isn't objectively reliable, unless you want superficial reassurances to comfort your indecision.
A few inaccuracies in the presentation of C++ which I believe comes from a lack of practice. For example, the value vs the reference thing only demonstrate poor understanding of what's really going on under the hood. So interesting video if you're looking for a wrap up of the myths and urban legends about C++.
Nice complaint, but lacking solutions.
Good comparison. But at the end it is like comparing apple with pear. You comparing the STL with the whole dotNet Framework.
In reality when we take the cross platform capability then there will be no GUI Framework in the dotNet world.
For GUI and other missing stuff in the C++ world, you can add e.g. the Qt Framework which has many features you mentioned on the dotNet side.
But in the end such comparisons are not very use full. It always depends on the problem you like to solve and which resources you have available.
The GUI issue will be solved eventually I think. It isn't a fundamental limitation of dotnet, there's just been a lack of interest in solving some fundamentals correctly. QtSharp's technique for emulating name mangled object code is about the best hack for the moment. It's a symptom of a deeper problem Microsoft has been trying and failing to solve for the last 30 years, because their basic approach is always the same - wrap C++ in an IDL type intermediary like DCOM / CORBA. IDLs are interesting but there's zero interest in building on that in the open source world. I don't think the C++/CLI approach is the right one either. Microsoft was not ambitious enough in building out meta-programming facilities with Roslyn so it fell way short of what it could have been. That's ultimately why you have no GUI, and no successful dotnet ports of mainstream languages.
C# job market wide.
In which language would you reccomend to start? I would like to start my journey in programming with one of this languages
Learn all of them! ;D Seriously - it really doesn't matter - maybe your job prospects would dictate the starting point. Programming is much, much more that language. The more languages you are fluent in, the better software engineer you will be in all of them. (plus, languages come and go)
7:24 uhm..functional programming is something totally different (C++ and C# are imperative languages). Of course you could say that since C++ template metaprogramming is Turing-complete, you can in fact use templates to write functional programs, but they will be "executed" by the compiler.
Agreed C++/C#/Java are not primarily functional. However, the ability to treat a function as an object is an important tool in realizing dependency inversion.
C++ better than C# in performance and all other tasks except backend web
C# is a highly productive, versatile and joy to program in, but it is despised because it's Microsoft. C# can also be compiled (AOT) on all platforms.
While it is true that you can compile C# programs for non-M$ platforms, it is generally a terrible experience and you are limited to older versions of C#. If you don't want to develop for M$ platforms (i.e. Windows and XBox) I would suggest not using C#, personally I would suggest Kotlin as a good alternative to C#.
.Net Core (modern c#) is run-anywhere. And if you consider Xamerin or Maui, you can cross compile for android and IOS.
C# is consistently rated as one of the most loved languages out there, so calling it despised is a bit excessive.
@@tordjarv3802 The headaches you have running JVM based code everywhere isn't too dissimilar from running .NET based code everywhere.
In the end, they're both rather easy to run cross platform nowadays, but each have their flaws.
@@Aidiakapi Who calls C# despised?
First C# and then C++ is the good answer
What an amazing video, straight to the point and very informative, thank you!
An inexperience programmer can tell you this. C++ is cloers to C in its nature. C# is closer to Java in its nature. The only thing both programming languages have in common is the letter C.
all 4 share a similar syntax. c# also has a considerable subset of features that bring it closer to c than java.
3:10 No! This isn't true, and it's an important distinction and a common misconception (especially among C++ programmers, for some reason). C# compiles to native machine code, exactly the same as C++. The only difference is that it does it at runtime using the CLR's JIT compiler. There's no VM involved. All C# code runs directly on the hardware, exactly like C++. It just has extra hooks to trigger the compiler (including potentially multiple times).
Kind-of the definition of virtual machine. The CLR (as well as the Java VM) does cache the native translation at runtime and .Net applications are certainly fast. But the whole idea of "managed code" is that the application runs in a runtime that is on the lookout for common problems like null references and index out of bounds, etc. That does add to execution time. Not saying it's good or bad.
@@McCulloughAssociates It's not though. By that logic, C++ caches the "native translation" when you compile. In that regard, C# is the same as C++ except that it finishes the compilation at runtime instead of ahead of time. It also doesn't run "in" a runtime. It's executed _by_ the CLR, but it's running natively, on bare metal, exactly the same as C++. The CLR is an extra step but not an extra layer. Uncompiled methods are compiled to stubs that call back into the CLR. Once the JIT has completed compilation, it modifies the stub to point to the compiled code and returns execution to the program. The checks and guards (like array bounds checking, which, arguably, a C++ programmer should be doing anyway) are compiled in. It's still native code, just with built-in safeguards. It's also worth noting that the safeguards are not even added when it's statically provable they're not needed.
I can't find any definition of VM that fits what C# and the CLR are. It's just a different way of compiling native machine code. I'm not familiar with Java but I would suggest that JVM is a misnomer.
This is very good. Too many C++ vs. this or that comparisons usually start with the ridiculous C++ is old and dangerous and should be abandoned kind of stuff.
I coded in C++ back when it was new and dangerous! It is only dangerous when developers are inexperienced or inept. Modern C++ is even easier to code bug free!
Thanks, sir for this robust overview
Gosh.....I am so discouraged, but won't give up trying to learn one of those languages. I am sure this was helpful for someone that have more than a basic idea of coding. Maybe one day I will understand this video in two years. :)
ua-cam.com/play/PLXd94bZTzZ-QaMgLp41ZUb_w0sjLBGjUp.html
You can call GC manually in C#.
This was very comprehensive, thank you.
What is the best to start to program a game?
Use Unity with C# - probably easiest to learn - unity.com/
For C++, use UnrealEngine.com
to program video games c++ or c# is recommended. I already have basics in programming so I have to choose a language and I don't know which one to choose. :(
C++ vs. C# in the gaming world is kind of a misnomer. Use whichever one you're more comfortable with, or whichever one your game engine makes available to you. In Unity, that's probably going to be C#, Unreal C++ (or blueprints), etc. If you're building one from scratch and are equally fluent in both languages, C++ will give you slightly better performance at the expense of increased code verbosity, while the C# compiler will give you much easier-to-interpret error messages and the language paradigm itself will give you improved code brevity. In the end though, it doesn't really matter to anyone outside of the development team. I've seen games created in Lua or Python that performed better than similar ones written in C++, and it all comes down to your preference.
I've also seen people make games in C# to lay out the essential gameplay framework, then switch to hosting that game library within C++ for the more advanced rendering, networking, and compiler optimizations it offers.
You choose the one being used by the engine you want to use. Unity used C# for scripting, Unreal uses C++ for scripting, other engines use other languages or in many cases offer their own in-house language.
While there are very good points here, most of them are not quite true or accurate. Still, gives a better than normal breakdown of the two, even if most of the information is not quite true, it is accurate enough for most purposes of the normal novice programmer.
Before C++ 20, the choice of which one to learn first was really easy win for C#, now I would consider them both equally valid based on your preferences and what sort of programming you want to do.
C# is a hybrid and extremely flexible language only limited by the skill of the user, it is FAR less opinionated than people think it is.
You can do almost anything a C++ does with C# and with enough skill, can in some scenarios even achieve faster speeds than C++ due to the ability adapt and optimize and recompile some parts of the code even at runtime based on detected patterns.
Also C# can use C/C++ libraries as needed as part of C#, and C# can actually decide when the code is compiled, it doesn't have to be compiled at runtime, but can also be precompiled as native machine code at compile time
New sub here! Perfectly explained, thank you!👏🏽
Sent this to my students! Subscribed)
Thanks!
5:10 enum types do not have member functions.
Correct - a bit of a misstatement. Using helper functions or an enclosing struct or class, we can simulate member functions similar to java.
Detailed comparison
As a Java programmer, this just makes me want to learn C# in conjunction with Golang.
Is C# kinda like JAVA?
Kinda, yes. And java would have been the correct contestant to compare C# to, not C++..
You can compare C++ with Rust for example
C# 1.0 was like Java but C# has evolved a lot further than Java since then.
C# was/is Microsofts aswer to, and implementation of Java 😉
@@maxfrischdev You can always compare.
This comparison makes no sense. Two tools for two very different jobs.
Why not learn both ? C++ for low level and C# for scripting and prototyping. They are similar enough.
Thanks Dear
Welcome
The very idea to place these two in the same sentence is stupid. They serve diametrically different purposes after all (despite the fact that it is possible to do almost anything in C++ this does not put it in the same category). C++ is low level language and can target not only the "metal", but it is still a low level language supporting higher level abstractions one can use as much as he wants or not use them and keep as close to the C level in the other extreme, but the main point is C++ is not bound to a bulky runtime without which C# cannot exist. So, this angers me - all those attempts to compare these as languages and not as totally different things in the programming ecosystem.
"C++ is not bound to a bulky runtime without which C# cannot exist." Bzzt wrong thanks for playing. Though, yes, in practice C# isn't there yet. There's considerable work yet to be done to make full independence from separate runtime components possible.
@@Ormaaj prove it
@Michael Elfial The specific language doesn't matter much here. A better question is: "Can you compile a useful subset of the IL to a traditional binary that only makes use of a static linked runtime and ordinary dynamic libs that don't need jitting?" Clearly the answer is at least "kinda" because that's been possible for quite a while now. See the mono project's AoT compiler documentation for details, particularly the "full AoT" mode.
Naturally, you lose functionality that depends on having the full JIT available particularly anything that requires `System.Reflection.Emit` isn't going to work.
As a side-note, I don't think fully eliminating the JIT is actually a worthy goal. I do not condone companies that want to enforce total lockdown of W^X on their systems and don't think we should appease them by crippling our compilers for that purpose. Those companies have hidden agendas. They're using their usual tactics to disguise anti-consumer practices as security concerns. I've been running selective W^X on my hardenedBSD and PaX systems since long before it was possible on any of these companies platforms. And now all of a sudden they're concerned for our security...
The Multi-Inheritance CHAD vs The Virgin Single Inheritance
Very well explanation and differentiation.
Glad you liked it!
Well am an c enjoyer Sooo...
See more...
That intro gave me "Developers, developers, developers, developers!" vibes
If you learn C# first, learning C++ may be more difficult, but it is a helluva lot more fun. Edit: At least it isn't that turd, Java. 🤮
Nothing Like C++
Yes, then it would just be called C++. However, there are languages that can do what C++ does, C# being one of them, since it is actually extremely close related to it when run in unsafe native mode and precompiled to native at compile time
I've never seen and can't find what means "value" vs "reference" based language, anyone?
Great question.
In C++, by default, a variable is large enough to hold the data (value) and a copy is passed to functions. emp in the line below is all the memory for employee data and copies are made if passed or assigned in c++. That statement in c# declares a reference, the equivalent of Employee* in C++. C# isn’t pure reference based as primitives have value semantics.
Employee emp;
In C#, emp is a null pointer (reference) and an object must be allocated from the heap via new. Only the reference is passed or assigned, not copies of the object.
Most functions in C++ are defined to pass references or pointers to avoid the cost of making copies, but that requires explicit syntax (* or &).
4:48
RIP typedef
6:02
RIP malloc and RIP free
Thanks for the comparison,having used all three extensively. I agree with most of it. When it comes to learning, Pascal is best (i.e. Delphi), which gives you the best of C++ & C# worlds. This is weird because the designer of C# also designed Delphi. C# could have been great but due to M$ mandates is CRAP!
Glad it was helpful!
Anders Hjelsberg also designed Turbo Pascal which is/was a big compiler on PC in the 80s-90s before Delphi.
He is also one of the creators or Typescript.
And claming C# is crap without stating its you personal opinion is a bit over the top since its in the top 10 most popular languages and used in thousands upon thousands of projects.
If it was really crap it would not be that big, no matter what personal preferences it disagrees with :P
*want to become a programmer and write code that runs faster with less memory go for c/c++ else go for any of the script writers language c#, java, Borneo, Sumatra and what not*
Just one little big problem with C# "windows / microsoft tech only"
.Net core runs anywhere. Old .net framework is obsolete