Is C# Better than C++?

Поділитися
Вставка
  • Опубліковано 14 січ 2025

КОМЕНТАРІ • 56

  • @MovitzFlowerhill
    @MovitzFlowerhill 3 місяці тому +7

    Went from C -> C++ -> C#, only using C# now, more interested in creating working apps then in being hard core.

    • @GavinLon
      @GavinLon  3 місяці тому +3

      I know exactly what you mean :) I'd rather build an awesome web application than an operating system lol

    • @MovitzFlowerhill
      @MovitzFlowerhill 3 місяці тому

      @@GavinLon Mostly developing in Unity now and lowing not have to use pointers and crap, just focusing on solving problems. But it's good to know something about what's happening in the background with memory. I rarely use the profiler i always optimize when i can.

  • @aytviewer2421
    @aytviewer2421 3 місяці тому +3

    In my experience, the answer is simultaneously YES, NO, and 42. But I choose C over C++ any day of the week, except for Sundays which is dedicated to Objective-C.

  • @truthsearch2366
    @truthsearch2366 3 місяці тому +2

    C++ has its strengths and weaknesses. Reading complexity and memory crashes are often unless pointers and threads are not handled properly. As someone says that C# compiler itself is written in C++.

    • @GavinLon
      @GavinLon  3 місяці тому

      Great! Thanks for your comment - automatic memory management and garbage collection is a great luxury that C# developers have. :)

  • @esra_erimez
    @esra_erimez 3 місяці тому +1

    As someone who's first job was writing in C++ for about 3 year, I feel that almost *any* language is better and C++

    • @GavinLon
      @GavinLon  3 місяці тому +1

      I can imagine. :) Its just such a complex language. In most jobs you'll be inheriting loads of legacy code to maintain - can be an absolute debugging nightmare.

  • @kvelez
    @kvelez 2 місяці тому

    Interesting review.

  • @gamereactz
    @gamereactz 3 місяці тому +2

    I learned java and c and ended up as a network admin because I thought i disliked software development.
    Later i picked up python and loved it but there was no jobs at the time.
    All i would see c# and i got very discouraged as i liked python and had a bad experience with c before..
    Thankfully i am now a c# developer after a company i was hired as an software admin gave me an opportunity.
    I love c# now.

    • @GavinLon
      @GavinLon  3 місяці тому

      That's awesome! Thank you for sharing your story :)

  • @aytviewer2421
    @aytviewer2421 3 місяці тому +2

    NOTE: I love C#, but when you use it with unmanaged libraries (looking at you MS Office Interop {excel automation, etc...}) it becomes a freaking memory leaking nightmare! You solve the memory leak, tweak some unrelated code, and wham bam the leak is back with a vengeance!

    • @GavinLon
      @GavinLon  3 місяці тому

      That's interesting I'll have to experiment with that a bit. Thanks so much for your comment :)

  • @kimutaifelix9092
    @kimutaifelix9092 3 місяці тому +1

    My mentor, I am happy to see you.

    • @GavinLon
      @GavinLon  3 місяці тому +1

      I'm happy to see you too :)

  • @leonellopez9193
    @leonellopez9193 3 місяці тому +1

    Very informative, subscribing now!!!!

    • @GavinLon
      @GavinLon  3 місяці тому +1

      Thank you! :)

  • @LukeAvedon
    @LukeAvedon 3 місяці тому

    Great sound effects!

    • @GavinLon
      @GavinLon  3 місяці тому +1

      Thank you! :)

  • @friedrichdergroe9664
    @friedrichdergroe9664 3 місяці тому

    I don't know why some say that C++ should not be your first language. I started out with C way back when AND wrote an OS in it and assembler back in 1980. I was 18 at the time and it was not all that hard to do. I've been doing C++ for years, and if you are competent, I don't see a reason why it can't be your first language.
    They also use to say that you should learn C before you learn C++. Circa 1990s. Again, why? Only because C++ was new back then, and many already experienced in C had to personally make that transition, and though -- wrongly -- that everyone else should have the same transition.
    C++ is indeed powerful and complex, but you do not have to learn it all before you can be productive.

    • @GavinLon
      @GavinLon  3 місяці тому +1

      Thank you for your comment and sharing your experience. I think C or C++ can certainly be your first language but in my opinion it is going to be far easier to get into programming learning a language like C# or Python. C# is similar to C++ but is going to be much easier to learn. Python is quite often chosen as a first language because of its simplicity. My first language was in fact C. Even though in this video I joked about C++ - of course it is a great language to learn and master. One aspect of the video is just to make those that are new to programming that C++ is one of the more difficult languages to learn - especially when compared to a language like C#.

  • @zealous261
    @zealous261 3 місяці тому +1

    Did anyone keep pressing 0 loads of times in a row like me?

  • @randyriegel8553
    @randyriegel8553 3 місяці тому

    Awesome video. I started out my first job out of college using C (not C++) on an HP-UX Unix machine. My next job I started using C# in 2005 as my main language... never looked back. But I've programmed in probably 50 different languages over my career but C# is my go to. Still use C/C++ at home for home automation, etc using Arduino's, ESP32's, etc. Fun hobby.

    • @GavinLon
      @GavinLon  3 місяці тому

      Wow - sounds like you've had a lot of experience with multiple programming languages! I definitely want to experiment more with home automation - as you say fun hobby :)

  • @junaid9781
    @junaid9781 3 місяці тому +2

    compare C# vs go

    • @GavinLon
      @GavinLon  3 місяці тому +1

      Great suggestion! This will happen :)

  • @Braneloc
    @Braneloc 3 місяці тому

    When I first tried C#, I thought, this is what programming is supposed to be like.
    Having tried others before and since, they all feel like they are all from the past, so I see no reason to update the opinion.

    • @GavinLon
      @GavinLon  3 місяці тому +1

      I believe C# makes it easy to leverage powerful functionality in a simply and straight forward way, using well established programming paradigms :)

  • @freaklore
    @freaklore 3 місяці тому

    C# is like VISA for programming, it's everywhere you want to be.

    • @GavinLon
      @GavinLon  3 місяці тому

      Great analogy! :)

  • @LengCPP
    @LengCPP 3 місяці тому

    If you are good at c++ it is better and if you are good at c# it is better, the best language is always the one you know best

    • @GavinLon
      @GavinLon  3 місяці тому

      I think you make an important point. If you are skilled in a particular language or a team is mostly skilled in a particular language - it is far more cost effective to stay with that language. Unless of course you need to accomplish a particular goal, that can best be done using another language for e.g. (C++ can run efficiently on resource constrained devices). Its all about weighing the pros and cons - often a trade off is needed :)

  • @Maximus98245
    @Maximus98245 3 місяці тому +1

    The elephant in the room was left out, the one that c# is copied from.

    • @yogibarista2818
      @yogibarista2818 3 місяці тому +1

      I think that's a bit of a stretch. For his part, Hejlsberg said that C# is "not a Java clone" and is "much closer to C++" in its design - despite the obvious comparisons. Much of the core syntax and programming concepts of V1 were similar, because they are obvious to people like Hejlsberg and Gosling, but there were differences even in V1.0 - e.g. class inheritance was already different - and C# had gone its own way by the time v2.0 was released - nobody would claim that C# and Java Generics are the same - and C# has continued to follow its own path.

  • @emperorpalpatine6080
    @emperorpalpatine6080 3 місяці тому +3

    C++ .
    Anything else is a skill issue

    • @GavinLon
      @GavinLon  3 місяці тому +1

      In many cases that skill issue may increase costs and prolong development time. :)

    • @isodoublet
      @isodoublet 3 місяці тому

      @@GavinLon C# doesn't even have const.

    • @GavinLon
      @GavinLon  3 місяці тому

      @@isodoublet Yes it does :)

    • @isodoublet
      @isodoublet 3 місяці тому

      @@GavinLon Very much doesn't.

    • @GavinLon
      @GavinLon  3 місяці тому

      @isodoublet Okay so the const keyword of course exists in C# but in C++ it can be used in different contexts. C# is designed to be less complex than C++.

  • @nightmere33
    @nightmere33 3 місяці тому +1

    Hello, I absolutely love your videos-your channel is pure gold! Thank you so much for the valuable content you provide. I have a question: I'm currently in my 3rd year of college as a computer science student, and I'm aspiring to become a software engineer & game developer. I'd love your guidance on the best path to take, especially for creating apps and web apps. I've learned C#, done some game development, and completed the Microsoft certification you recommended. Could you offer some advice on what steps I should take next?

    • @GavinLon
      @GavinLon  3 місяці тому +3

      Hi! Sure, it sounds like you are on the right path to achieving your goal. I'm so glad that you have completed the Microsoft certification - that is a great place to start! I would recommend this certification (ua-cam.com/video/6GQAE7iLOhY/v-deo.html) to anyone that wants to learn C# as it provides an aspiring C# developer (including game developers) with a solid foundation. I think the Unity game engine or Godot are excellent game engines to learn, perhaps start with Unity. Start by building basic games and apps, and make your code publicly available on GitHub and make your games or apps publicly available - so that your apps can be used and your games can be played. Be open to feedback from the developer community at large :) Web development (perhaps using Blazor) is great because it is easy to deploy and make your apps available to the public. The biggest piece of advice I can give you is make sure you are enjoying what you are doing - and never get overwhelmed. Maintaining great mental health is extremely important. When you are ready, I would strongly recommend that you get a job in game development or application development - don't be too fussy at first about salary or your position in the company - it is important to get a few years experience and then you'll be in a stronger position to negotiate a better position and salary. I would also look into how you can use AI to increase your overall productivity. AI is going to be a part of our futures whether we like it or not. :)

  • @francoislepron2301
    @francoislepron2301 3 місяці тому +1

    Good comparison.

  • @eitantal726
    @eitantal726 3 місяці тому

    might as well code in python

    • @GavinLon
      @GavinLon  3 місяці тому

      I definitely want to do more videos on Python on this channel :)

  • @JulioJerez-z1f
    @JulioJerez-z1f 3 місяці тому +2

    C# is nott even close to c++

    • @GavinLon
      @GavinLon  3 місяці тому +1

      Well I wouldn't code a device driver in C# and I wouldn't code a web application using C++ - but I would do the opposite of what I just stated. They both have their place - and C# was profoundly influenced by C++. :)

  • @dschledermann
    @dschledermann 3 місяці тому

    No, no. Rust 😁

    • @GavinLon
      @GavinLon  3 місяці тому +1

      A Rust video will have to happen I think :)

    • @dschledermann
      @dschledermann 3 місяці тому

      ​@@GavinLonit's a very different take on making a descendant to C++ for sure.