Is C# Better than Java?

  Рет қаралды 10,893

Gavin Lon

Gavin Lon

Күн бұрын

In this video we compare two excellent software technologies, C# and Java.
🕐 Video Time Indexes
-------------------------------------
00:00:00 - Introduction
00:00:44 - A brief Overview of Java
00:03:03 - A brief Overview of C#
00:06:48 - The similarities between C# and Java
00:09:59 - The differences between C# and Java
00:13:57 - Who wins C# or Java?
00:14:28 - Conclusion
Blazor Courses
------------------------
Build a Shopping Cart Application using Blazor WASM and Web API
🔗 • Blazor (WebAssembly) a...
Build a Sales Management Application using Blazor Server and Syncfusion Compoments
🔗 • Blazor Server App with...
React Courses
------------------------
Project Based React Course for Beginners
🔗 • React JavaScript Frame...
Ranking App using React with .NET (C#)
🔗 • React with .NET Web AP...
.NET 8 Playlist - Blazor's new Featurs and Enhancements
🔗 • What's New in .NET 8 ?
Is Blazor Better than React Video?
🔗 • Is Blazor Better than ...
Support the Channel 👍
------------------------------------
Buy me a Coffee ☕️
🔗 www.buymeacoffee.com/GavinLon
PayPal
🔗 www.paypal.com/paypalme/GavinLon
🪙 BitCoin
12JZYMiRq5YRDN5R5zuyYt7jMN8eTpkgns
Please follow me on Twitter @GavinLonDigital
Links Referenced in this video
-------------------------------------------------
Nuget Packages
🔗learn.microsoft.com/en-us/dot...
.NET Assemblies
🔗learn.microsoft.com/en-us/dot...
CIL Code - Common Intermediate Code
🔗learn.microsoft.com/en-us/dot...
AOT - Ahead-of-Time Compilation
🔗learn.microsoft.com/en-us/dot...
Full Playlist - C# for Beginners Course
------------------------------------------------------------
🔗 • Unity for Beginners (C...
Free Courses and Educational Videos - Gavin Lon
-------------------------------------------------------------------------------
Blazor (Webassembly) Shopping Cart Application full playlist
🔗 • Blazor (WebAssembly) a...
Full playlist - Let's Build an ASP .NET Core MVC Web Application on .Net 5
🔗 • Part 1 - Overview - Le...
Full playlist - Advanced C# Course
🔗 • Introduction - Advance...
Full playlist - C# for Beginners Course
🔗 • C# for Beginners - Par...
Blazor Server App on .NET 6 Course - FreeCodeCamp
🔗 • Blazor Server App with...
🎶All Music in this Video was Created by Gavin Lon

Пікірлер: 138
@battletremor
@battletremor 5 ай бұрын
I have just started programming in c#, It was very easy to learn and I could put my logic into code effortlessly. So c# is a better choice for me, this video helped me understand more about c#, great work 💯
@GavinLon
@GavinLon 5 ай бұрын
It's my pleasure. I'm really happy that this video has been helpful to you :)
@akeemaweda1716
@akeemaweda1716 5 ай бұрын
The differences are the reason I stick with C#. Though, I started with Java but more mouth watering features of C# made me stick to it. C# wins almost everywhere if objectively compared.
@GavinLon
@GavinLon 5 ай бұрын
I totally agree! C# wins for me too! Thank you for your comment! :)
@femidaniel
@femidaniel 5 ай бұрын
My Experience,we once had an airtime vending project built with Java and deployed on wildfly,,@ peak demand periods it would suddenly freeze daily,when we moved over to another one built with C#, i took time to note we only restarted that application twice in a whole year,i have a great Java Dev as a friend too,but Microsoft with DotnetCore and now Blazor will always be my preferred choice and serious wide margins,Thanks for the detailed post,great work.
@GavinLon
@GavinLon 5 ай бұрын
You are very welcome! Thanks so much for sharing your experience with both Java and C#/.NET. I will certainly not be moving over to Java any time soon. I'm very happy sticking with .NET and C# :)
@marko5734
@marko5734 5 ай бұрын
Great video as always
@GavinLon
@GavinLon 5 ай бұрын
Thank you very much! :)
@cissemy
@cissemy 5 ай бұрын
Thanks Can you make one about CSharp vs python ?
@GavinLon
@GavinLon 5 ай бұрын
I've already done that. :) Please check out the video here - kzfaq.info/get/bejne/er14Y7dmx7Gdm3k.html
@RedbeardyMcGee
@RedbeardyMcGee 5 ай бұрын
did you generate this video script with chatgpt 1.0
@GavinLon
@GavinLon 5 ай бұрын
No - I never use AI in my videos.
@MegaJohn144
@MegaJohn144 5 ай бұрын
I programmed in Java for about 10 years, but I never fully got it. Java and all its tools seemed clumsy and disjoint. After retiring, I taught myself C# and Python, and I much prefer them. I cut my teeth on C and C++, so it is a natural choice.
@GavinLon
@GavinLon 5 ай бұрын
Yes exactly, why make life harder than it needs to be? :) Python and C# are so much easier to learn and apply in my humble opinion. My first language was C - definitely a great first language.
@LE8271
@LE8271 5 ай бұрын
I believe one aspect is missing from the summary. It is the fact that .net core was created containers and Internet in mind. When it comes to containerization it just kills Java hands-down. Look at the size and the performance of a Java based container that tells everything.
@GavinLon
@GavinLon 5 ай бұрын
Great, yes that is a useful addition - thank you!
@RLstavista
@RLstavista 11 күн бұрын
Yes
@Anbu_Sampath
@Anbu_Sampath 5 ай бұрын
C# has nice language features when compare to Java, but C#/.NET mutliplatform target came bit late when compare Java/JVM. Now unified .NET is big move and attract more devs.
@GavinLon
@GavinLon 5 ай бұрын
Yes, I totally agree with that!! Java is way ahead at the moment, because (as you have stated, C# and .NET have only fairly recently become cross platform and unified) but the gap is closing :) C# and .NET is becoming more and more popular!
@nickbarton3191
@nickbarton3191 2 ай бұрын
And C# now has extensive FP support, I predict that it'll take over Java's 3rd spot.
@ryanobray1
@ryanobray1 5 ай бұрын
I wish that C# would include the ability to add properties to enums like Java, but that's pretty much where it ends for me. Perhaps my biggest turn off with Java is that Oracle is the language steward. I also VERY much prefer Visual Studio over IntelliJ and Eclipse AND not having to deal with pom files.
@GavinLon
@GavinLon 5 ай бұрын
Thanks for this interesting comment. Visual Studio definitely makes life a lot easier. I wonder if Microsoft will add properties to enums in a future version of .NET - might happen :)
@julianjupiter5890
@julianjupiter5890 5 ай бұрын
Oracle may be a bad company in general. But we should not judge by that optic as far as Oracle being steward of Java is concerned. Oracle turns out way better steward of Java. Those who observe objectively do recognize Oracle being good steward.
@DmitryBaranovskiyMrBaranovskyi
@DmitryBaranovskiyMrBaranovskyi 5 ай бұрын
"Properties to enum"... Are u okay? That it wont be an enum.
@julianjupiter5890
@julianjupiter5890 3 ай бұрын
The good thing with build system like Maven (pom.xml) is you don’t need IDE to build our app.
@vijayansivaraman7923
@vijayansivaraman7923 5 ай бұрын
C# wins over java. Great video on the planet to showcase the pros and cons of c# and java. Kudos to your hard work and efforts.
@GavinLon
@GavinLon 5 ай бұрын
Thank you for your very kind comment! It is greatly appreciated :)
@hammeedabdo.82
@hammeedabdo.82 5 ай бұрын
My personal opinion is that C# is better, and it should be ranked after Python and JavaScript. However, I don't know why I always see Java ranked before C#?
@GavinLon
@GavinLon 5 ай бұрын
I honestly and objectively cannot think of a better programming language than C#. I also like Python and JavaScript, they certainly have their place but Java could probably be seen as the most similar language to C#, and in my humble opinion C# wins hands down! :)
@dirkschannel5817
@dirkschannel5817 5 ай бұрын
Another great Video. I used both in my career. C# long felt like the better Java. For the defense of Java one should keep in mind that Java is a bit older than C#, so Microsoft could improve C# and add stuff like properties. Since C# can now be used on Linux systems, the main advantage of Java vanished.
@GavinLon
@GavinLon 5 ай бұрын
C# has benefitted from being the younger language. Now that C# is cross platform, C# and .NET, in my humble opinion, is far better than Java.
@hugochavez6170
@hugochavez6170 5 ай бұрын
What do you mean with properties?
@dirkschannel5817
@dirkschannel5817 5 ай бұрын
@@GavinLon Do you know Dave Plummer’s channel? The result of the software drag race with implementation of the prime sieve algorithm regarding C# and Java was an interesting surprise. Would be interesting to see a rematch with .NET 8
@GavinLon
@GavinLon 5 ай бұрын
@@dirkschannel5817 I'll check out Dave Plummer's channel. Thanks! It would be good to do a deep dive comparison between C# on .NET 8 and Java - its just finding the time to do all these things :)
@iekie4180
@iekie4180 3 ай бұрын
I have a question, and it's a very strange one. First of all, I also prefer C#, and my question is, why do all KZfaqrs say that Python is the best beginner programming language when it doesn't even have data types? I mean, we programmers always tell beginners that they need to learn data types, etc., so why does everyone suddenly say Python? In this regard, I find the best and absolute best programming languages for beginners to be Pascal, C#, or Java. I mean: Strict data types: Unlike some other languages like C++ or Java, Python has dynamic typing, meaning variables don't need to be explicitly declared and their type can change during runtime. This can confuse beginners who are accustomed to strict data types. Whitespace sensitivity: Python uses indentation (whitespace) for structuring code instead of curly braces like in other languages. Beginners might struggle with using the correct indentation, leading to syntax errors. Complexity in larger projects: While Python is well-suited for small to medium-sized projects, it may hit its limits with larger projects, especially when it comes to performance optimization. Beginners might struggle with understanding scalability and performance optimization. Inheritance and OOP concepts: Although Python is object-oriented, beginners might find it difficult to grasp concepts like inheritance, polymorphism, and encapsulation and apply them. Lack of explicit error messages: Python might not be as strict in terms of error messages as some other languages. Beginners might struggle to identify and debug errors in the code if Python doesn't explicitly point them out. Is Python overrated?. I learned programming with Pascal in 2016, and then we learned C#, and I never had any problems. The concepts in Pascal with begin and end, or repeat until, procedures, or functions taught me the understanding of programming.
@GavinLon
@GavinLon 3 ай бұрын
Wow - thanks for this detailed comment! I think Python is a great first language because it is relatively easy to learn. It has, of course, also been widely adopted by academia and is very effectively used in AI, machine learning and data science. I don't know if Python is overrated but I do think perhaps C# is underrated :)
@iekie4180
@iekie4180 3 ай бұрын
@@GavinLon I know Python is simple, but in my opinion a beginner should also understand what is behind an example like: name = “Alex”. Is it an integer or a string? I think this is how programming should be learned, not just writing something without knowing what data type it is because Python understands it automatically. This is important to me and I'm a fan of C# (= At school or training you also learn how to deal with data types and therefore you have to practice it, so Python is more for people who have a little more knowledge and not for absolute beginners Machine learning or other technologies are initially not relevant for absolute beginners. During my training I wrote the exams on the paper (crazy teacher, I know) Thanks for the reply
@GavinLon
@GavinLon 3 ай бұрын
@@iekie4180 I think you make some great points here. I actually would encourage a beginner to learn a strongly typed language as a first language :)
@adikztv6371
@adikztv6371 3 ай бұрын
It isn't 100% fair to say that the difference between Java and c# is that you can Write frontend in c#. In java you can do it as well. If you want to make such notion then you'd Rather have to compare These technologies instead of saying that Java lacks it
@GavinLon
@GavinLon 3 ай бұрын
Okay - thanks for your feedback :)
@tanakamichael-dp1nb
@tanakamichael-dp1nb 5 ай бұрын
Java was my 2nd first programming language. Used it quite a bit until I started to hate it, then I switched to JavaScript with mostly Angular. Later on, I picked up on how some startups are combining Angular and .NET to create performant solutions. So, I embarked on a journey to learn C# language basics early this year. One thing I'm certain of is I'm staying with C# and .NET. Definitely it's better than Java.
@GavinLon
@GavinLon 5 ай бұрын
Thanks for this interesting comment! Yes, it's also quite convenient that .NET provides Angular and React project templates to make it easy to combine relevant front-end SPA frameworks with .NET and C# on the backend. :)
@paulpach
@paulpach 18 күн бұрын
I work in Java most days at work. It is an ok language. Libraries like spring boot help make it more palatable. Then I go home and work on my own projects in C#. So if I have the choice, I will choose C# for many of the reasons you listed.
@GavinLon
@GavinLon 18 күн бұрын
It's great to get comments like yours that are based on personal experience with the relevant languages. Thank you for your comment :)
@potatoml4631
@potatoml4631 5 ай бұрын
C# but im using Java for work
@GavinLon
@GavinLon 5 ай бұрын
Java is an awesome technology but I much prefer C# and .NET. Nothing wrong with Java at all in my humble opinion.
@christopherwilliams3293
@christopherwilliams3293 5 ай бұрын
I'm in the same both. I do admit that IntelliJ is better than Rider, but Jetbrains does allocate a lot of resources to Rider still. I wish Rider had search structurally and the rich debugging features like IntelliJ. However, Rider team is very busy keeping up with the .NET technologies.
@jaymartinez311
@jaymartinez311 19 күн бұрын
Started with C++, then python and then Java. Left all of that behind once i started using typescript. Got a job in Vuejs saw i was dealing with many api fetches & changing the data for my use case once fetched, so i started learning back end. Tried typescript blah. Java was a mess for it. Golang was great but didn’t have enough stuff built in. Rust was fun but without a framework i couldn’t learn how to use lifetimes but polonius might fix that soon. Then i finally tried C# seriously with their ugly bracket placements 😂. I love it. Dotnet 8/C# 12 is like a typed typescript. It’s my favorite language. The brackets i use K&R code style meaning them brackets are with the signature on the same line 😜. I usually use a big O notation project to learn a language & hands down C# was flawless in creating such a project. inline object creation with new = { } is one of the many js/ts type coding i love C# for. Though Java & C# look alike from far away C# is a much bigger language & much much better to develop in and the cli is awesome 😎
@GavinLon
@GavinLon 19 күн бұрын
Wow - thank you for this well thought out comment! I really enjoyed reading it and I totally agree with you on everything you said about C#! It's definitely my favourite language too! :)
@jaymartinez311
@jaymartinez311 19 күн бұрын
@@GavinLon Only frustration is i’m 41, just got my CS degree but Jr roles (real ones) are non-existent anymore. I love this stuff but i guess i’ll just build something with a dotnet backend with vuejs or if im lazy webflow for the frontend 😂🫡
@GavinLon
@GavinLon 19 күн бұрын
You'll get a job. Just keep going and keep building. My advice is build something awesome and get it into a GitHub repository - so that you can show potential employers what you are capable of creating. Don't worry about your age - 41 is pretty young these days anyway. Just keep going - you certainly have great enthusiasm and seem to love coding - that is very important! :)
@jaymartinez311
@jaymartinez311 19 күн бұрын
@@GavinLon Thank you for the kind words.
@7th_CAV_Trooper
@7th_CAV_Trooper Ай бұрын
yes. the answer is yes.
@nestormartinez9259
@nestormartinez9259 4 ай бұрын
In fact C# it's cool lenguage but here where I live Java came with a better salary and also it's more used, althought maybe this could be change soon. I belive not in a way where java would be replace but in way where both of them compete more directly in fields where Java is well adpted like banks and other enterprise aplications.
@GavinLon
@GavinLon 4 ай бұрын
Yes, Java is still more widely used than C# in general, but that gap is getting narrower. Java is certainly a great technology but I prefer .NET and C#. The great thing about these two languages is that if you know object oriented principles and you are skilled in one of these two languages, it is relatively easy to learning the other language (because they are very similar in many ways).
@TampaCEO
@TampaCEO 5 ай бұрын
I started in Delpihi in 1993 and used it for 15 years. Then, in 2008, I switched to C# and never looked back. It is by far the best language ever made.
@GavinLon
@GavinLon 5 ай бұрын
C# is definitely my favourite programming language. Thank you for sharing your experience :)
@randyriegel8553
@randyriegel8553 5 ай бұрын
I used Java a long time ago. Then I met up with C#... It had almost the same syntax the time but C# was like Java on steroids. Been a C# developer since 2005. My first job out of college I used plain C on a SCO Unix server. It's very funny now that the company I work for has many languages for different things... my biggest downfall is Python... I always have to search stuff up or ask the Python Guru at our company when working that stuff.
@GavinLon
@GavinLon 5 ай бұрын
Thanks so much for sharing your experience. C was actually the first language that I studied, VB6 was the language I used at my first job, then I moved to VB .NET and then C#..Most people seem to favour C# over Java - and I can certainly see why. Python is definitely worth learning, especially with the rapid evolution of AI! :)
@sugekanu6163
@sugekanu6163 Ай бұрын
Yes. C# is my new goto. I just started learning C# and it looks similar to java but simpler. Thanks for your tutorials and guides.
@GavinLon
@GavinLon Ай бұрын
You are very welcome. Java is a great language but as you say, C# is perhaps simpler to use. :)
@joakimdahlstrom2532
@joakimdahlstrom2532 5 ай бұрын
Regarding split classes... Now... I'd argue that the intended group of programmers sat down and at least learn SOLID if ending up having to split the classes :)
@Turko77777
@Turko77777 5 ай бұрын
I don't understand what you're saying
@diadetediotedio6918
@diadetediotedio6918 Ай бұрын
I prefer Kotlin because the syntax is way nicer, but I love C# because it has a waaaaaaay better runtime with value types and type monomorphization, a Kotlin for .NET would be the best of both worlds.
@GavinLon
@GavinLon Ай бұрын
Thanks for your great comment. I must say I'm intrigued by Kotlin and would like to explore the language more. I like what you said about C#, .NET is an amazing runtime and I love the type system! It's definitely my favourite programming language.
@dotnetMasterCSharp
@dotnetMasterCSharp 5 ай бұрын
I like working with languages ​​in the c family. Because it is closer to machine language. I haven't tried it with Java yet. The information in the video was very helpful for my understanding of Java. Thank you!
@GavinLon
@GavinLon 5 ай бұрын
Great! I do like the c-style syntax myself! Thank you for your comment and you are very welcome!
@slr150
@slr150 5 ай бұрын
Java is more careful about introducing new syntax than C#. C# may not be very attractive in the moment, but in the long run you get a more stable language in Java. A good example is Java victual threads, it was carefully designed to make sure that functions are colorless, where c# is still stuck with colored functions and await/async. The trouble with having new syntax catering every new fad is that when it goes out of fashion you are left with language bloat. C++. is another example of language bloat going badly .
@GavinLon
@GavinLon 5 ай бұрын
I like your point about syntax. It is far more important to learn programming principles and fundamentals - code sugar can be good but it should not be a priority, as you say to follow every fad that comes along :)
@DmitryBaranovskiyMrBaranovskyi
@DmitryBaranovskiyMrBaranovskyi 5 ай бұрын
What is the new systax is really bad in c# added in the latest releases?
@slr150
@slr150 5 ай бұрын
​ @DmitryBaranovskiyMrBaranovskyi The trouble is not with "new syntax" , it is when "new syntax" eventually becomes old syntax and goes out of fashion. I already gave you an example with sync/wait (these color your functions). Java accomplished the same thing as async/await without introducing a single keyword or having a color limitations on function calls (Lookup project loop/virtual threads). Although I think Java is better than C# when it comes to unnecessary features, it still has some historical baggage. I would personally pick Go instead of Java/C# for new projects. Go has minimal syntax, had virtual (green) threads from the start, avoids multiple ways of doing the same thing, and is relatively fast compared to C#/Java.
@flogginga_dead_horse4022
@flogginga_dead_horse4022 5 ай бұрын
yes
@GavinLon
@GavinLon 5 ай бұрын
👍
@farrenh
@farrenh 4 ай бұрын
C# is wayyy better than Java in terms of language design. But also its runtime is better. Don't listen to people who've invested decades in Java when they tell you that performance and resource use are roughly similar and it depends on the application. It's just not true. .Net runtime is more performant and uses less resources. And it absolutely slaughters Java in high concurrency tasks (1 million+ equivalent concurrent tasks on the same hardware) The video mentions pointers in C#, but doesn't mention that apart from the performance gains from doing some C# algorithms with direct pointers and pointer arithmetic (in an unsafe {...} scope), you can use pointers in C# to run inline assembly by getting a delegate function pointer to the start of a byte array representing assembly code. Which means you can get the same or better performance than C/C++ code using assembly for specific functions. I mean aside from just interoperating with C libraries, which you can also do. But Java can do that too. Also not mentioned in the video (because its mainly about the languages not their runtimes), but the .net runtime does tail-call optimization of recursive functions, whereas the JVM does not. You can google what that means, but the Cliff's notes version is: If you write a recursive function where the self reference is the last statement in the function, like this int myFunc(int i) { //do stuff with i if (someExitCondition) { return i; } else { return myFunc(i); } } The .net runtime will optimize it so that there is only ever one instance of the function on the stack. That means it can continue recursing (calling itself) endlessly, without constantly consuming more memory. No matter how many recursions it will only consume the memory required for a single instance of the function. The JVM, in contrast, will create a new instance of the function on every call, while preserving every previous instance, meaning if it recurses for ever it will continuously consume more memory and you *will* eventually get a stack overflow. Also not mentioned: Java *still* doesn't have properties (looks and behaves like a public variable or constant from the outside, getter and setter methods hidden under the hood) or events (much easier than using callback interfaces in Java) as first class language constructs, unlike C#. And they only just introduced pattern matching in Java. C# has had it for something like 7 years. And like most equivalent features, the C# version is much less verbose.
@GavinLon
@GavinLon 4 ай бұрын
Wow - thanks for these additional points. I especially love your point about recursion! When I've got the time I'd love to do a much deeper dive into C# vs Java. The points you make here show just how much thought has gone into .NET and C# optimisations.
@isnotnull
@isnotnull 5 ай бұрын
Is Java still using get and set compared to properties in C#
@GavinLon
@GavinLon 5 ай бұрын
This is how getter and setter properties are implemented in Java - www.geeksforgeeks.org/getter-and-setter-in-java/
@isnotnull
@isnotnull 5 ай бұрын
@@GavinLon So still no auto properties. I learned Java in 2014, seems no progress since then
@GavinLon
@GavinLon 5 ай бұрын
@isnotnull I don't think Java have auto implemented properties like in C# :)
@henryvaneyk3769
@henryvaneyk3769 5 ай бұрын
@@GavinLonAlmost no Java devs use get and set anymore. We all Lombok our properties.
@blueSurfer
@blueSurfer 5 ай бұрын
Java also has records . so we can only write a single line to create getters, setters, toString, hashcode. public record Employee(int id, String firstName, String lastName) {}
@gurudaki
@gurudaki 5 ай бұрын
C# all the way for the future in my opinion...!
@GavinLon
@GavinLon 5 ай бұрын
That is also my opinion :)
@henryvaneyk3769
@henryvaneyk3769 5 ай бұрын
Any developer that limits their programming toolbox to a single language is a fool. Rather learn to use both Java and C#, and do not stop there.
@GavinLon
@GavinLon 5 ай бұрын
As a new developer, I personally wouldn't waste my time learning both C# and Java. I would specialise in one of these languages but I do certainly agree with learning more than one language, but between Java and C#, I would pick one or the other. I would then perhaps learn Python for machine learning and data science applications. I think regardless whether you are proficient in C# or Java, you should definitely learn JavaScript, especially if you are an aspiring web developer. There are some attractive new languages like Rust or Go - which I would also consider learning.
@ronaldjohnson4470
@ronaldjohnson4470 5 ай бұрын
My preference is C#.
@GavinLon
@GavinLon 5 ай бұрын
My preference is also C# and .NET :)
@wakeelsaliu5190
@wakeelsaliu5190 5 ай бұрын
C#. It's faster, and knowing only C# is enough to be a fullstack developer and also build both your mobile and desktop apps with it.
@GavinLon
@GavinLon 5 ай бұрын
Yes, those two points certainly make C# sound like a great choice over Java. :)
@sanampakuwal
@sanampakuwal 5 ай бұрын
C# definitely wins!
@GavinLon
@GavinLon 5 ай бұрын
I agree!!! :) Thank you!
@davidgrajalesmirage
@davidgrajalesmirage Ай бұрын
C# as a language is more flexible and we may say "better" than Java. But Java has a far better, bigger and open ecosystem and multiplatform support. With C# you are basically traped in a golden cage made and controlled by Microsoft, I know the latest versions of .NET framework (.Net core) has multiplatform support but it came very late AND the multiplatform support it's incomplete (no win forms for Linux for example) also the nature of .NET in the past and all the legacy applications have made that basically 95% of C# development is focused on windows. Nothing wrong with that, but if you are not interested in windows development (both server and desktop) real world C# development will mostly target Microsoft and azure and that's a limitation.
@GavinLon
@GavinLon Ай бұрын
Awesome! Thank you! It's great to get a fairly detailed comment from the Java perspective! :)
@daniel-peiro
@daniel-peiro 5 ай бұрын
Html is the
@astrahcat1212
@astrahcat1212 5 ай бұрын
Well, I think it's more about, all these companies are still using Java systems, so if you're a very experienced programmer you can make a lot of money using Java. C# is kind of more modern and these days I believe blowing past Java due to Microsoft's support. Python is still the best language to learn today though I think.
@GavinLon
@GavinLon 5 ай бұрын
Yup I think once a company is committed to a technology (like Java) - it often doesn't make sense to move to a more modern technology because of the cost involved. I think having Microsoft support is a huge reason to develop green field applications using .NET and C#. Python is a great language but C# is better in my opinion, one of the main reasons being that C# is a statically typed language. I also think C# is a fairly easy language to learn.
@astrahcat1212
@astrahcat1212 5 ай бұрын
@@GavinLonI'm actually more of a C# programmer myself, but learning Python I do enjoy the quick compilation with it being interpreter based. The younger generation all seem to be learning Python though, and CS students and many companies, so I think it'll continue to expand and grow. C#'s syntax still makes perfect sense to me though.
@GavinLon
@GavinLon 5 ай бұрын
@@astrahcat1212 Python is a great language, and of course great for AI and data science applications. I prefer C# for many reasons but think Python is a great first language to learn primarily because of its simplicity. :)
@flogginga_dead_horse4022
@flogginga_dead_horse4022 5 ай бұрын
Been programming for 25 years, could never stand Java. Still using C# or Rust now at this point.
@GavinLon
@GavinLon 5 ай бұрын
I'm looking forward to C# vs Rust at some point!
@ievgenmajor3301
@ievgenmajor3301 4 ай бұрын
c# features looks like disadvantages
@GavinLon
@GavinLon 4 ай бұрын
Interesting - could you elaborate on that a bit? :)
@eriknyk2k
@eriknyk2k 5 ай бұрын
C# copied Java since it born
@GavinLon
@GavinLon 5 ай бұрын
C# is certainly not a Java clone and is much closer to C++ in its design. It of course does have a lot in common with Java. One has to bear in mind that both of these languages are both C based and support object oriented programming. Anders Hejlsberg (the designer of C# at Microsoft) said the goal (when creating C#) was to provide the power and expressiveness of C++ as well as the rapid application capabilities of Visual Basic. Certainly the JVM and the CLR are very similar when comparing .NET to the JRE - the C# language itself, however, has evolved and seems likely to continue to evolve far beyond Java.
@eriknyk2k
@eriknyk2k 5 ай бұрын
@@GavinLon It isn’t anymore, but here’s a brief history: In the late 1990s, Sun Microsystems developed a language they called Java. At the time, most programs were written for a specific operating system. Some languages were “portable”, but the source code had to be recompiled for every new system. Java allowed a program to be written once, compiled and then run on any operating system. Nifty! In addition, small programs could be run inside a web page. Microsoft got on board and started supporting Java: they supported it in their browser and even released a version of their IDE for it. While doing this work, they came up with ways of improving Java just for Windows. This pissed off Sun, because that was the opposite of what Java was all about: the same program was supposed to run the same on all devices. It wasn’t supposed to be different for different operating systems. Microsoft got mad that Sun was being mean to them, and withdrew native support for Java in their browsers and killed their Java IDE. They decided to make their own competing language, which brought us C#. In the beginning, C# was similar to Java in many respects. Java compiled to “byte code”, which was then executed by something called the Java Virtual Machine (JVM). C# compiled to Microsoft Intermediate Language (MSIL), which was the same idea as byte code. It was then executed by the .NET Framework, which was an idea similar to the JVM. C# borrowed a number of ideas from Java, such as the lack of raw pointers, using . for dereferencing always instead of . sometimes and -> at other times, a construct that C++ used. But right from the start, there were differences. Anders Hejlsberg, the lead designer of C#, added something called properties, which were a big boon to C# programming, and still are. They also included enums, which Java lacked (Java has them now, but considers them full classes or some such weirdness). Now, almost 20 years later, C# has a number of features that Java can’t touch. I won’t cover them here, but C# is less of an imitation of Java now than it originally was. C# and Java continue to borrow from each other as each continues to try to one-up each other. They still share a number of similarities. Most C# programmers would have little trouble reading Java and vice-versa (though a Java programmer’s head might explode trying to read some LINQ statements). C# started out as an imitation of Java (or a competitor), but now stands on its own.
@anm3037
@anm3037 5 ай бұрын
I still wonder how😂java programmer manage to work without extension methods
@GavinLon
@GavinLon 5 ай бұрын
Yes, I'm also used to luxuries like extension methods and auto implemented properties provided by C#. :)
@ripple123
@ripple123 5 ай бұрын
java ecosystem >> C# ecosystem
@GavinLon
@GavinLon 5 ай бұрын
Sure the Java ecosystem is bigger but as time goes on that gap is likely to close. :)
@julianjupiter5890
@julianjupiter5890 5 ай бұрын
⁠@@GavinLonand language features gap between Java and C# will also close.
@GavinLon
@GavinLon 5 ай бұрын
@@julianjupiter5890 Well that will certainly improve Java - perhaps I can do a more comprehensive deep dive into the comparisons between C# and Java at a later stage. Thanks for your comment - great to get the perspective of someone who is clearly pro Java! :)
@Turko77777
@Turko77777 5 ай бұрын
because it has to patch the shortcomings
@benderbg
@benderbg 5 ай бұрын
C# and Java can be called OOP language siblings. After all C# was developed as a Java clone. Why not learn both and be a true back end guru! Now days, C# has a nicer syntax and feels more modern. Java on the other hand has bigger ecosystem not tide to only one company. There is a reason why big tech don't prefer C# because everything around it is opinionated. If you want maximum out of it you need to be in Windows/Azure world. I'd also like for Microsoft to port Visual Studio to Linux. Its not really cross platform language until it has full IDE support it deserves. MAUI is also not supported on Linux at all.
@GavinLon
@GavinLon 5 ай бұрын
Very interesting comment! I really enjoyed reading it! With every release of .NET there seems to be amazing progress, so I think with the heavy investment in C# and .NET by Microsoft - we'll see a lot of positive changes - perhaps that will address the issues that you have mentioned in your comment. Having said that , I do like a lot of the points you make here :)
@rankarat
@rankarat 5 ай бұрын
C# runs on linux perfectly!
@GavinLon
@GavinLon 5 ай бұрын
@@rankarat Yes I believe you can run .NET MAUI apps on Linux - I haven't tried it yet myself but I think it can be done - techcommunity.microsoft.com/t5/educator-developer-blog/net-maui-on-linux-with-visual-studio-code/ba-p/3982195
@eugenschabenberger5772
@eugenschabenberger5772 5 ай бұрын
You forgot to mention the dumb checked exceptions in Java.
@GavinLon
@GavinLon 5 ай бұрын
In the end I actually had to leave a lot out because it would've made the video too long :)
@priyanshu4016
@priyanshu4016 5 ай бұрын
java and only java , :D wins
@GavinLon
@GavinLon 5 ай бұрын
What!!!?????? lol - Just kidding - okay - one for the Java team!
@carosan3719
@carosan3719 5 ай бұрын
Kotlin
@GavinLon
@GavinLon 5 ай бұрын
Okay challenge accepted - coming soon - Is C# better that Kotlin?
@RuanStrydom
@RuanStrydom 5 ай бұрын
No challenge. Kotlin is a much safer language. It prefers immutability over mutability. Coroutines enforces structured concurrency and is generally just better designed. Sequences vs the random implementations of Ienumerable. The list goes on and on. .Net == infinite runtime errors. Oh and not to mention kotlin multiplatform and all it's targets, JS, wasm, native, JVM.
@GavinLon
@GavinLon 5 ай бұрын
@@RuanStrydom Thanks for your strong views - well I look forward to diving into this comparison further. I disagree about .NET = infinite runtime errors. In my experience .NET is very robust.
@RuanStrydom
@RuanStrydom 5 ай бұрын
@@GavinLon I would argue Rust is robust. Type safe functional languages are robust. A mutable language with unbound concurrency I would not describe robust. I'm looking forward to the video, I hope you spend some time with it, it's a good language. Not great but good. PS I'm currently in a C# job.
@GavinLon
@GavinLon 5 ай бұрын
@@RuanStrydom Thanks so much for your interesting comments :) Its great to get a variety of perspectives. I'm looking forward to exploring Rust!
@miyu545
@miyu545 5 ай бұрын
Java hands down wins in a game development scenario, outside of that Java is simply just not the best choice anymore. C#!
@eugenschabenberger5772
@eugenschabenberger5772 5 ай бұрын
Unity c#, Unreal c++, Godot Gdscript or c#. Where is Java?
@farrenh
@farrenh 4 ай бұрын
C# is hands-down better for game dev. 2 of the 3 most used game engines (Godot and Unity) support C#, with good reason. Java isn't even on the map in serious game development, although if you're developing games that don't require optimal performance, you can certainly use Java if you want to.
@IgorLisx
@IgorLisx 5 ай бұрын
I prefer to stay away from anything that originated from Microsoft.
@fabricehategekimana5350
@fabricehategekimana5350 5 ай бұрын
Thank you for this informative video ! I am really proud to see the new iteration of C like C++, Java, C#, or Rust my preferences: 1. Rust 2. C# 3. C++ 4. Java Actually, I heard that Java is paid more because companies have a large code base of legacy code written in Java (too expensive to switch technologies) and some java devs are retiring so a java dev is a precious resource
@GavinLon
@GavinLon 5 ай бұрын
Very good point about large Java code bases of legacy systems. So Rust is your number 1 - I hear it is a great language - I look forward to diving deep into Rust fairly soon! :)
Top 10 Reasons to Learn C# 2020 - 2024
2:28:13
Gavin Lon
Рет қаралды 2,5 М.
Why Should I Choose C# As My Programming Language?
18:50
IAmTimCorey
Рет қаралды 52 М.
ISSEI funny story😂😂😂Strange World | Pink with inoCat
00:36
ISSEI / いっせい
Рет қаралды 29 МЛН
😱СНЯЛ СУПЕР КОТА НА КАМЕРУ⁉
00:37
OMG DEN
Рет қаралды 1,8 МЛН
Glow Stick Secret (part 2) 😱 #shorts
00:33
Mr DegrEE
Рет қаралды 47 МЛН
小路飞姐姐居然让路飞小路飞都消失了#海贼王  #路飞
00:47
路飞与唐舞桐
Рет қаралды 77 МЛН
C# vs. JAVA: Сделай Правильный Выбор! / Какой ЯП учить?
1:05:08
TeachMeSkills Школа программирования
Рет қаралды 71 М.
Is C# Better than JavaScript?
17:53
Gavin Lon
Рет қаралды 3 М.
Is Blazor Better than Next.js?
13:24
Gavin Lon
Рет қаралды 4 М.
Java 21 Is Good?! | Prime Reacts
27:08
ThePrimeTime
Рет қаралды 207 М.
Java is Declining and C# is Gaining - How Do We know??
11:39
Gavin Lon
Рет қаралды 2,7 М.
How Senior Programmers ACTUALLY Write Code
13:37
Healthy Software Developer
Рет қаралды 1,3 МЛН
Is C# better than Python?
10:47
Gavin Lon
Рет қаралды 9 М.
how Google writes gorgeous C++
7:40
Low Level Learning
Рет қаралды 736 М.
ISSEI funny story😂😂😂Strange World | Pink with inoCat
00:36
ISSEI / いっせい
Рет қаралды 29 МЛН