Is C# better than Python?

แชร์
ฝัง
  • เผยแพร่เมื่อ 24 ม.ค. 2025

ความคิดเห็น • 100

  • @avinashmendse4370
    @avinashmendse4370 ปีที่แล้ว +27

    i will choose C# for enterprise application. For data processing I will prefer Python

    • @GavinLon
      @GavinLon  ปีที่แล้ว +5

      I love this comment because it alludes to the fact that the requirement is often the best driver as to which technology should be chosen.

    • @JaimeHaddad
      @JaimeHaddad ปีที่แล้ว

      Completely agree with your comment. Both are great programming languages but it will depend on what will be your final objetive.

  • @hammeedabdo.82
    @hammeedabdo.82 ปีที่แล้ว +12

    Both of them are distinguished in some areas, as you mentioned in the video, and your choice depends on your needs, but in general C# performs it better and faster than Python, and closer in syntax to Java or C++.
    Please,We would a comparison video between Blazor and other frameworks.

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      Absolutely! Great comment! :)

    • @HMan2828
      @HMan2828 ปีที่แล้ว

      Blazor is an absolute blast, it blows everything else out of the water... There are so many "failed" web frameworks built on JS, it feels insanely liberating just dumping C# right into the HTML instead of having to deal with the shortcomings and particularities of a hundred different flavors of JS...

  • @coverstack6157
    @coverstack6157 10 หลายเดือนก่อน +2

    I had been a programmer (preferably windows app) since year 2000, started with pascal, c, c++, visual foxpro, tried also delphi and using visual basic until 2009. When the insurance company I had been working told us to create new app for their insurance system, our team decided to go for C# without looking back 🥰 Haven't tried python for production development, but in my opinion it is much easier to code and debug using C#. Really loved curly brackets, since it is easier and faster to find a conditional scope, haha 😉😊🥰I will choose C# any day.

  • @OmbasaMukhwami
    @OmbasaMukhwami ปีที่แล้ว +41

    i choose c#

    • @GavinLon
      @GavinLon  ปีที่แล้ว +3

      I like both languages - but my preference is definitely C#! :)

    • @surya.s3464
      @surya.s3464 3 หลายเดือนก่อน

      Why?

  • @fabricehategekimana5350
    @fabricehategekimana5350 ปีที่แล้ว +5

    In my case I am biased because I was looking for a low level programming language with a good implementation of functional programming and I find that rust is my best choice (I use it for personal projects). I use python for my studies but I was impressed by the power of C# and his rich features

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      I must admit, I'm intrigued by Rust. Python is definitely a great first language to learn. A learner can learn all the fundamentals of programming using an easy to read and write language like Python. When the learner is fairly proficient with Python, the learner can then move on to for e.g. statically typed (better performing) languages like C# or Java. As.I said in the video, I personally believe, that C# is also a pretty good first language to learn too.

    • @fabricehategekimana5350
      @fabricehategekimana5350 ปีที่แล้ว

      @@GavinLon I agree. C# seems to be a good language to start compared to languages like java (that seems to have a little bit of boilerplate) or rust (that have a steep learning curve).
      Did you heard about Nim ? Some people claims that his syntax is as easy as python but it seems to lack in the community/resources department

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      @@fabricehategekimana5350 thanks for your comment! I've never heard of Nim, but am always interested in learning about new technologies so will definitely investigate this. Thank you! :)

    • @johnmaguire2185
      @johnmaguire2185 ปีที่แล้ว

      Just started to learn code using C#. Why would an independent newbie choose Python?

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      @@johnmaguire2185 My advice would be to stick with learning C#. You can always learn Python later. One criteria for learning Python as a first programming language is that the syntax is simpler than in C# but I believe C# is still an easy language to learn for a first language.

  • @JaimeHaddad
    @JaimeHaddad ปีที่แล้ว +3

    I like both programming languages, both have strengths and weakness but will depend on my objectives. The only concerning part for me is using Python for Enterprise development where I need to keep control of all of dependencies updates to avoid conflicts with my libraries when these receive newer versions. I know there ways to manage this but I feel safer with C# within the .NET environment.

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      I agree. Large applications with many dependencies to worry about, in my opinion, are easier to maintain over time when created using C# and .NET. Why make life any more difficult that it has to be :)

  • @embossCoder
    @embossCoder ปีที่แล้ว +5

    Its the matter of preference. And i prefer c# for its clarity

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Absolutely - they are both great programming languages but sometimes its just down to personal preference :)

  • @christsciple
    @christsciple ปีที่แล้ว +1

    I'm a software engineer and data architect. Most places I've worked at use both Python and C#. They do great in the areas they're specifically developed for; Python for data handling/ETL and ML, C# for application development.

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      Thank you for this informative comment. It seems that Python is still the most popular language for ML applications, and in some cases is used for other backend tasks. So perhaps if developers learn both Python and C#, it might give the developers a bit more of an edge in the market. :)

    • @christsciple
      @christsciple ปีที่แล้ว

      @@GavinLon For sure! Most data engineers utilize both languages for data analysis and ETL (especially if you're an SSIS user!). Python will continue to lead in ML for at least the next 5 - 10 years if not more simply because of it's robustness, ease-of-use, and plethora of ML libraries that are tailored for it. I wouldn't mind seeing more serious rivals challenge it's position in the future!

  • @igorthelight
    @igorthelight 4 หลายเดือนก่อน

    1:47 - let me rewrite those ;-)
    C#:
    if (feelingFriendly)
    Console.Write("Hello World!");
    Python:
    if feelingFriendly:
    print('Hello World!')
    * In many languages if you want to check if something is true - just check "if something".
    * "True" and "False" must start with uppercase letter in Python unlike in many other languages.
    * In C# you could omit brackets if there is only one command
    * In many C-like languages you could write many commands on the same line (try to use that rarely):
    if (feelingFriendly) Console.Write("Hello World!");
    * In C#, if you need to use "Console" (or any other static class) a lot - you may do this trick:
    using static System.Console;
    if (feelingFriendly)
    Write("Hello World!");
    It's the equivalent to Python "from some_module import some_class"

  • @LE8271
    @LE8271 4 หลายเดือนก่อน

    There are so many things to discuss about. Containers, Unit testing, database support, DI, general cleanness of code. List just goes on and on. The only field I see advantage to Python is ML and jupyter notebook.

    • @GavinLon
      @GavinLon  4 หลายเดือนก่อน

      We could definitely go into a lot of depth here. I agree, there is a lot more to discuss. Python is definitely an important language in the machine learning and AI sphere.

  • @HMan2828
    @HMan2828 ปีที่แล้ว

    Just to clear up a tiny little thing, C# is statically typed, but DOES support late binding through the dynamic type... As in, in C# you have the option, vs in Python it is always dynamically typed...

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      In Python you can use static type hints but only to verify correctness of the source code at compile time. Python is a dynamically typed language. C# is statically typed but the dynamic type can be used for dynamic typing (in order circumvent the type system).

  • @astrahcat1212
    @astrahcat1212 ปีที่แล้ว +1

    I've been developing games in Unity for well over a decade, using C#, I like it it does what it needs to, but the problem I have is that if I was using an interpreted language like Python or Javascript for the game logic, I probably would have taken years less time to get more done. Interpreted languages are better for game development, then, in my opinion. You need a C++ backend if you want to get on consoles (full portability), a potential thing you could do is to use PyGame, that uses a C++ backend using SDL2, include the source in your project folders.
    What I wanted to do for future games, since I work on 3D games, is to use Blender for level editing, export to a text file, then read from it into PyGame.
    To be honest using this way it would have been faster for development than using Unity overall.

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      Sounds very interesting. I'm no expert when it comes to PyGame, but do have a fair amount of experience with Unity and Blender. Thank you for your point of view! I also really enjoy creating and modelling in Blender! In fact Blender could be given as a great reason to learn Python! :)

  • @pashkett
    @pashkett ปีที่แล้ว +3

    Thanks for your job. Believe it would be useful for newcomers that want to start learning programming
    I am using C#

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Awesome! Thanks for your feedback and you are very welcome! :)

  • @broadshare
    @broadshare ปีที่แล้ว +5

    They are both great programming languages which can be used for different purposes based on the application. I use both but C# is my main programming language

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      I agree! They are both great programming languages that can be used for a multitude of different types of requirements. Perhaps Python is a better choice for some requirements and C# for others :)

    • @rafapioli75
      @rafapioli75 ปีที่แล้ว

      Me too!

  • @iswilson
    @iswilson ปีที่แล้ว

    As a beginner backend developer, I have learnt Nodejs and looking for a second language to add to my stack. Between Python and C#, which of these two would you recommend.

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Python is a great languages but I admittedly have a bias toward C# and .NET. For backend I would recommend C#, it's dynamically typed which means better performance and also potentially greater robustness at runtime! Its easy to debug and also has the support of Microsoft! Python is perceived to be easier to learn, but I think C# is a fairly easy language to learn :) If you are going into data science and machine learning, perhaps Python is a better choice although you can also use C# for those purposes.

    • @iswilson
      @iswilson ปีที่แล้ว

      @GavinLon ok. My only concern with C# is that I use Ubuntu and I feel like C# and its frameworks would work better on windows than other platforms.

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      @@iswilson .You can certainly run .NET on Ubuntu although I haven't yet personally done so. My recommendation is to perform a test, with basic C# code on Ubuntu and see if it performs as expected. You could do the same with Python. Learning both Python and C# is another option - this can make you more marketable as a developer :)

  • @abbassiziad1379
    @abbassiziad1379 11 หลายเดือนก่อน +2

    C# as a language is great and the DotNet ecosystem is well established. but, it is only suitable for enterprise-level projects and it is used only by Microsoft. I think the learning curve of Dotnet framework is big enough to Think 1000 times before wasting your time learning it. This time could be used to learn or doing many other things.

    • @GavinLon
      @GavinLon  11 หลายเดือนก่อน +3

      Thanks for your comment :) I respectfully disagree with almost everything stated in your comment (of course I do agree that C# is a great language) but I do appreciate you taking the time to comment. DotNet is very versatile and the learning curve is not so steep in my opinion. :)

    • @naokmoon1487
      @naokmoon1487 4 หลายเดือนก่อน

      What most developper should practice by example is Dependency Injection, Middlewares, Moving business logic inside Services/Managers instead of Controllers, learn doing Interfaces and abstract class, avoid repetitions, learn good concepts from design patterns and importance of Validating Data for SQL Injection and all security concerns for XSS, CSRF attacks. C#, PHP, Python are all same for me at the end. Some distinctions for sure, but this is not the primary concerns for a developper in 2024.
      C# .NET 8.0 is compiled, very strong-typed class == which is love for OOP ! There is also LINQ and Entity Framework or Dapper that worth to learn.
      PHP can work with Laravel and become a superpower PHP Framework that is almost at strong as C#. (Interprated langage). Also very strong for making scripts that runs ease for Cronjobs and Web development since it is interprated languages as python.
      Python is more of a toolbox to do almost anything like C#, Web development, AI, Desktop Application, Scripting, but excel in Data science/ML domain.
      IMO, I think it is 100% better to learn important concepts that will be useful in all programming langages we learn, than only mastering 1 language.
      Depending on what you search. C# Is very high in demand for enterprise and is well paid ! So I think it is worth the time you will spend in, because you will learn solid principles with it and becomes a better developper for sure.

  • @vxsniffer
    @vxsniffer 8 หลายเดือนก่อน

    1:45 boolean values in Python starts with capital letter (True/False)

    • @GavinLon
      @GavinLon  8 หลายเดือนก่อน +1

      That's true, I mean True. Sorry about that! Oops, my bad!

  • @fakeITDevTeam
    @fakeITDevTeam ปีที่แล้ว +3

    I prefer to use structured languages/frameworks, like c#/dotnet, typescript/angular. It will be easier (for me) to maintain more complex projects.

    • @GavinLon
      @GavinLon  ปีที่แล้ว +1

      Really great point! I totally agree!! Facilitating Easy maintenance is super important especially for large projects.

  • @abhishekjadhav9289
    @abhishekjadhav9289 6 หลายเดือนก่อน

    Thank you for the nice video. I need your advise. I have 10 years C# .Net experience. Lately I am seeing lot of job requirements where companies asking for experience in C# and python. Considering the trend, is it essential for .Net Developers to learn Python also ? Can C# and Python be a part of single project in a company ? Kindly advise. Thank you.

    • @GavinLon
      @GavinLon  6 หลายเดือนก่อน +1

      I would advise you to specialise in one language that can be used on the backend - I have chosen to specialise in C#, and also to have at least a basic knowledge of JavaScript (because it is so widely used in frontend web applications). I'm sure there are plenty of jobs where just C# and .NET is used and other jobs where just Python is used. So I don't think you need to learn Python per se, if you are a C# and .NET specialist. Having said that, if you have the time to do so, there is nothing wrong at all in gaining Python as a new skill. It may give you an advantage over other .NET programmers who only know C#.

    • @abhishekjadhav9289
      @abhishekjadhav9289 6 หลายเดือนก่อน

      @@GavinLon Thank you so much for the great advise..

  • @freshko07
    @freshko07 21 วันที่ผ่านมา

    I have already chosen C# cuz' I love developing games. For me personally, C# is not that HARD as many believe.

  • @dirkschannel5817
    @dirkschannel5817 ปีที่แล้ว

    I use and like both.
    Besides web development I use them for different use cases. We automated our infrastructure with python - things where performance is not an issue.
    There is no real versus…

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Sounds sensible! Both technologies are powerful but using each of them appropriately based on their strengths can yield optimal results!

  • @hotlineoperator
    @hotlineoperator ปีที่แล้ว

    I choose C#, even there are thinks I do not like
    - { curly braches }
    - syntax where my variable name is somewhere in the middle, not in first
    - Microsoft, not fan of update policy, and UI

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Thank you for providing your personal thoughts on C#. I also choose C# :)

  • @ulrich-tonmoy
    @ulrich-tonmoy ปีที่แล้ว

    Really Unity now
    For game dev i would suggest C++ or the scripting language of the engine of your choice

    • @GavinLon
      @GavinLon  ปีที่แล้ว +2

      Unity is great for C# developers. If you are proficient in C++ then Unreal Engine is also an amazing game engine to learn.

  • @hmdz150
    @hmdz150 9 หลายเดือนก่อน +2

    C# is a more beautiful language but Python is a more practical tool;
    I learned C# about 20 years ago when the language was version 1.0 . It was one of the hottest programming language of its time and made life much easier for C++ developers who wanted to use the dot net framework to develop applications for Windows. But it was only after I learned Python and worked with the open source community that I realized thing could be done much faster (in Python) than they could in C#.
    Python is a much more practical language (for me) mainly due to its vast ecosystem and free libraries available. There is almost a Python library for anything you can imagine. And Python code runs (almost) on any operating system. I have developed many more projects in Python that made their way to the market and became running systems than I did with C#.
    You worry about performance of your code? There is a Python library for it too!

    • @GavinLon
      @GavinLon  9 หลายเดือนก่อน

      Thanks so much for this detailed comment. I really enjoyed reading it! :)

  • @AhmedMohammed23
    @AhmedMohammed23 4 หลายเดือนก่อน

    c#: i'm faster i'm more reboust i'm better *in homelander voice

  • @Doggy_Styles_Coding
    @Doggy_Styles_Coding ปีที่แล้ว +1

    Why did the Python programmer get lost in the forest? Because they couldn't find the right path and kept getting "None"!

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      lol - Hopefully jokes like these won't start any trouble in the comments section :)

  • @JohnSmith-po5pj
    @JohnSmith-po5pj ปีที่แล้ว +1

    me personally, Python is my least favorite language of all.... I use c# daily, and front end libraries

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      That's a strong view. Thank you for sharing! My main language for frontend and backend programming is C# :)

    • @FilipCordas
      @FilipCordas ปีที่แล้ว

      python is God awful only reason someone uses it is because he wants to impress non-programmers that you do something smart. All good Python is written in c.

  • @ZombieJig
    @ZombieJig ปีที่แล้ว +1

    The best first language to learn is C. I wouldn't want to write C on a day to day basis but in terms of learning the fundamentals you can't go wrong.

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      My first language was actually C and then Visual Basic! You are right it is an excellent first language because so many languages are of course based on C. :)

  • @babutschi
    @babutschi 7 หลายเดือนก่อน +2

    Python is the most overrated programming language ever

  • @FilipCordas
    @FilipCordas ปีที่แล้ว

    You can do same terrible dynamic stuff in c# it's just not used much because dynamic is terrible.

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      That is true. In C# you can use the dynamic type or simply define variables as objects and avoid strongly typing your variables altogether but of course by doing that you are just circumventing the benefits of using a strongly typed language. Strongly typing your code ensures better performance and better robustness at runtime! :)

  • @mehmetkrgnn
    @mehmetkrgnn ปีที่แล้ว

    I am a Pythonian here to learn C#. Hi.

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Great! You are very welcome! :) Hi back at you!

  • @marcus31425
    @marcus31425 8 หลายเดือนก่อน

    Is this even a question? It would be more meaningful if we compare it over Java

    • @GavinLon
      @GavinLon  8 หลายเดือนก่อน

      I think it is a worthwhile comparison - the video highlights important differences like dynamically typed vs statically typed (and the significants of this).

  • @Just_the_Cube
    @Just_the_Cube 4 หลายเดือนก่อน

    C# is to unity as python is to ai

  • @GnuChanOS
    @GnuChanOS 3 หลายเดือนก่อน

    i choose python and c

    • @GavinLon
      @GavinLon  3 หลายเดือนก่อน +1

      Fair enough! :)

  • @savemysoul4112
    @savemysoul4112 หลายเดือนก่อน

    for web developer C# is better, for data analyst python is better

    • @GavinLon
      @GavinLon  หลายเดือนก่อน

      C# will certainly be useful if you need to develop custom tools or applications that integrate with your data analysis workflow. So you can certainly integrate C# apps with your data analytics apps. As you say, C# is great for web development. It's also great for full-stack development, and enterprise solutions in general. In fact I would say C# and .NET are the best technologies for the development of full-stack, enterprise solutions.

  • @IgorIks-l9d
    @IgorIks-l9d 4 หลายเดือนก่อน

    C#

  • @ahmedbenissa5982
    @ahmedbenissa5982 11 หลายเดือนก่อน

    Comparing the two is an insanity

    • @GavinLon
      @GavinLon  11 หลายเดือนก่อน

      lol - well I think it is potentially a good way to teach the fundamental differences between a popular dynamically typed programming language and a statically typed programming language.

  • @zimcoder
    @zimcoder ปีที่แล้ว

    Yes

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Short answer but to the point! Thank you! :)

  • @WaliaIbex
    @WaliaIbex ปีที่แล้ว

    I like k it is superior .

    • @GavinLon
      @GavinLon  ปีที่แล้ว

      Very obscure language :)

  • @SrinivasGanta-tm1zh
    @SrinivasGanta-tm1zh 10 หลายเดือนก่อน

    C#, ez

  • @drewsarkisian9375
    @drewsarkisian9375 ปีที่แล้ว

    No.

  • @vitalyl1327
    @vitalyl1327 10 หลายเดือนก่อน +2

    Python is a very low bar. Chances are that any randomly chosen language will be better than Python.

  • @amiriko6220
    @amiriko6220 10 หลายเดือนก่อน +1

    C# much more better language as it runs much faster than Python and fully OOP, it has truly primitive type and can save data on stack while python cannot.

    • @GavinLon
      @GavinLon  10 หลายเดือนก่อน

      It surprises me that C# isn't more popular. I think it is likely to become way more popular in the near future!

  • @iswilson
    @iswilson ปีที่แล้ว

    As a beginner backend developer, I have learnt Nodejs and looking for a second language to add to my stack. Between Python and C#, which of these two would you recommend.

    • @warny1978
      @warny1978 8 หลายเดือนก่อน +1

      What do you want to do with your code ?
      If you don't know, i'll suggest C#, just because it is staticaly typed. It prevents a lot of errors, but it makes code prototyping a little more difficult.
      Code prototyping is writing code to see how it works, or if it works, before writing code with the right guidelines.

  • @IgorIks-l9d
    @IgorIks-l9d 4 หลายเดือนก่อน

    C#