Go lang mindset is different than C# if you try to to use OOP mindset while using go you are going to hate it.
@GavinLon3 ай бұрын
That is a great point :)
@DavidSmith-ef4ehАй бұрын
@@GavinLon if(err != nil)... lol, yeah, c# will win in the long term. Go is just too simplistic and they force these things down your throat. They need to add more language featres like option types.
@hellelo.584024 күн бұрын
@@DavidSmith-ef4ehGo and Rust are designed to force you to be more explicit
@NickTheCodeMechanic14 күн бұрын
OOP shouldn't be used in C#... not unless you're intentionally build libraries where you absolutely need inheritance or polymorphism. Otherwise, just code function after function and chain the results. Stuff 'em in a class and name it after common relevance. Then DI the class a as a Service and put a Controller endpoint in front of it. Done. DRY. Don't reinvent the wheel. Keep variables scoped to the function, yes, even if you have to repeat the same variable, different function. Code C# like you would Go, and you'll see that Go is just C for dummies after all.
@GavinLon14 күн бұрын
@@NickTheCodeMechanic I actually kind of agree with you there in a way. You shouldn't use OOP just for the sake of using OOP - but rather use it where there is a clear purpose for using it - which applies to any programming practice. In general OOP is good programming practice for achieving extensibility, reusability, better maintainability, separation of concerns, the facilitation of easy unit testing. SOLID is important to know and there are many design patterns that can be applied that can pay dividends when implemented correctly. There are of course other ways to implement your code as you have alluded to in your comment but it's certainly a good idea to learn OOP as a C# programmer.
@randyriegel85533 ай бұрын
I've been a software engineer for over 20 years. The last 15 I've mainly used C# & SQL. Wrote everything from Console apps, Desktop apps, Web apps and Phone apps with it. I've been forced to dabble in other languages when asked such as Python and Go. I HATE them! They are suppose to be simplistic but I can't wrap my head around them. My first job out of college I was writing C and ASM on a HP-UX server. I can figure out any language to make a fix or something but if I'm starting something new I want C#. 😁
@GavinLon3 ай бұрын
C# is always my first choice :) Thank you for sharing your experience and opinion :)
@francoislepron23013 ай бұрын
I do share your analysis. First, where does Python come ? As a software developer in semiconductors, hardware designers hate everything which is not born from UNIX or Linux. They started to write scripts in Perl and after in Python and they push Python all over the world without trying to see if another scripting language for simulation could fit their needs. Linux is a cancer since what is not coming from Linux is the devil.
@roccociccone5973 ай бұрын
that's beacuse you most likely try and write all other languages as if they were C#. And Go is not a better C#. Go is better at not being as bloated and convoluted as C#
@francoislepron23013 ай бұрын
@@roccociccone597 Could you give us several examples of code where you find that C# is convoluted compared to Go. This would be interesting for coder like me who don't know at all Go. Thank you !
@curtmantle74863 ай бұрын
I’ve been working in C# and .NET since 2008 and this is a good and fair summary. I think the real power of C# is the ecosystem with .NET and the wealth of third party tools and libraries. I really like the look of Go though based on my limited exposure to it.
@GavinLon3 ай бұрын
C# and .NET are amazing like you say because it is so powerful and has such a large ecosystem. It does sound like Go makes concurrency a lot more simple which could save a developer a lot of pain when implementing concurrency code. I'm all for making complex tasks as simple as possible :)
@YabseraPython3 ай бұрын
I use golang because it is more friendly to old hardware than c#,java,rust
@GavinLon3 ай бұрын
Thanks so much for sharing your experience :)
@RomanAvdeevX2 ай бұрын
Wdym?
@YabseraPython2 ай бұрын
@@RomanAvdeevX i have 2gb ram with 32ssd with dual core. Old potato pc it runs the lsp and other tool perfectly I have tried both c#,java and rust on it and the experience have sucked
@lofipolis23 күн бұрын
In my opinion, they are incomparable. Can you imagine that tools like Docker would be written on C Sharp? It would eat up a huge amount of memory and processor resources and would be slow. C Sharp is designed for pop programming with an emphasis on convenience, and Golang is a high-performance language, whose paradigm is incompatible with OOP, without which C Sharp cannot exist.
@GavinLon23 күн бұрын
Some strong views. Thank you for your insight :) C# is my favourite programming language so admittedly I'm a bit bias when it comes to comparing C# to other languages but it is great to get different opinions and perspectives. I respectfully disagree with you on a few points regarding C# but thank you for your comment :)
21 күн бұрын
Go is simple and supports DDD and TDD effectively. It provides easy connectivity with databases, MQTT, and has one of the fastest compilers. In contrast, the C# model is more complex, Docker integration is less straightforward, memory usage is higher, and version updates can introduce changes that require adjustments.
@GavinLon21 күн бұрын
Awesome - thanks so much for sharing your insights :)
@keyboard_g3 ай бұрын
Looking at salary alone is kind of nonsense. There are 1,000x more C# jobs out there in the corporate world.
@GavinLon3 ай бұрын
That is very true - and C# developers get compensated very well in general.
@Capsaicinophile3 ай бұрын
Both are great tools. But there is a major difference between them. C# is a "product" of Microsoft, whereas Go is a "tool" at Google. Microsoft markets C# and associates it with other Microsoft products that make money, like Microsoft Azure, for example, setting up JWT is a pain in .NET, but using Microsoft authentication services can be set up easily as an option from the template. Go on the other hand is more of an internal tool that Google made open source. C# brings food to my table, and I like how vast the .NET ecosystem is, and C# code is simply beautiful. Go on the other hand, makes me a better programmer, by forcing me to handle errors everywhere, and by having no unnecessary abstractions, making me implement things myself and learn how things work under the hood, than to memorize some class names that do it for me.
@GavinLon3 ай бұрын
Thanks so much for sharing your experience. Very insightful. I definitely want to do a deeper dive into Go at some point on this channel.
@roccociccone5973 ай бұрын
C# code looks like Java with some syntactic sugar. I don't need my code to look beautiful I need it to work as expected. There's plenty of things I don't like about C#, but one of the biggest problems is it's OO heritage and exceptions for errors rather than errors as values.
@Sub0x-x403 ай бұрын
I am forced to learn both at school, C# is not better than golang in my inexperienced opinion. I also enjoy c# but im not working in it for side projects, i find myself coming back to golang. But if I want to actually get a job then C# is the superior option because there are loads more jobs in C#
@GavinLon3 ай бұрын
Thanks so much for sharing your experience with both of these languages. :)
@robertmrobo89543 ай бұрын
The question the title asked is not answered on the video.
@GavinLon3 ай бұрын
It's a question we need to ask ourselves once we relate the facts pertaining to each language to our specific context. You may answer the question differently to me - but neither answer is necessarily wrong. I hope that makes sense. :)
@The_Genezis26 күн бұрын
Its like comparing hammer and swiss-knife. C#/.NET is more versatile and robust suitable for vast amount of application and domains, whereas Go is more focused language with way more narrow use cases in which it will be most of time more performant then C#, but offering way less language features. Also for smaller projects Go can pull ahead of C# in many cases in terms of performance and ease of use, but with larger scale which will be most of non tool or commercial projects, .NET will scale way better then a Go project in most scenarios
@GavinLon26 күн бұрын
Thanks so much for this well thought out comparison :)
@vornamenachname90615 күн бұрын
I mainly use c# and Rust, also I'm very familiar with "languages" like Python. Since net9 I must admit the speed difference between rust and c# became so small in most cases, it's not worth the effort. Since the difference between python and rust is sometimes in the tenths of thousands times faster, in c# it's often one-dot-something.
@GavinLon15 күн бұрын
@@vornamenachname906 Thank you for sharing your insight. The performance of C# has been optimised a lot over recent versions of .NET. I'd love to perform a formal speed test - C# vs Rust - that would be interesting.
@Nurtastube14 күн бұрын
I'm learning C# but I don't understand OOP style. It's so difficult.
@GavinLon14 күн бұрын
My advice if you want to learn OOP is firstly split OOP up into the individual parts, Encapsulation, Inheritance, Polymorphism and Abstraction. Then try to understand each of these concepts at a high level - then try to apply the concepts in your code. Take your time learning these concepts, stay with it and eventually you'll start to grasp the concepts and you'll see the immense benefits of OOP.. Please check out this playlist - kzbin.info/www/bejne/fpTNgJatgrhnadk - to help you along the way :)
@Nurtastube14 күн бұрын
@GavinLon Thanks for the advice. I understand the OOP concept. But I still can't think in the OOP style. Although I wrote a lot of different code. But I still can't think in the OOP style. It turns out that there are a lot of programmers like me who can't think in the OOP style. This is probably also a talent, the ability to think in the OOP style.
@GavinLon14 күн бұрын
@@Nurtastube You can also use other styles using C# but I'll argue that the more you practice applying the OOP style, the more you'll get comfortable using it and reap its benefits. But then again, the beginning of wisdom is knowing yourself (Aristotle) - so you know yourself better than anyone else :) Choose the style that you prefer :) My advice, however, is perhaps don't rule out OOP just yet. :)
@batiandanielliu35982 ай бұрын
In my opinion, if you’re a business owner looking to save money on servers while supporting more users, Go is the best choice. It uses less memory and CPU on the same hardware, allowing it to handle more user requests efficiently. Additionally, Go is not as complex as Rust when it comes to writing server applications.
@123mrfarid7 күн бұрын
I like simplicity in Go and i wrote a big corporate app with it. I disagree with anyone that go would be slow for big and complex app but fast for simple apps. I agree that develop complex app in go is repetitive, but it is VERY fast. Maybe one of the cheapest in resources among apps that i wrote. And very stable, very error free. After project done, i almost never touch it again since no error. Smooth running for years, almost without need of maintenance. Lately i write JS since it is easier to write complex app in it. But i will consider C#. I just dont want to be taken hostage by microsoft if possible.
@GavinLon7 күн бұрын
Thank you for sharing your experience and insights into Go, C# and JavaScript. :)
@IronCandyNotes3 ай бұрын
2 different tools used in different contexts, learn both
@GavinLon3 ай бұрын
Exactly, you do'n't have to necessarily choose between the two but I would recommend prioritising which languages to learn and in which order. Choose what to learn based on your personal context..
@ulrich-tonmoy3 ай бұрын
The thing is do we still need these runtime compiled language in this day and age We should have C/C++/Rust/Zig (lowest human readable) JS/Python(Runtime without compilation) Go (between low and runtime benefits of both)
@GavinLon3 ай бұрын
That is a great question. It'll be interesting to see how C# and Java evolve moving forward. You can actually AOT C# in some cases already - where you don't need JIT and need to deploy the runtime to the target machine - so it seems to be moving in that direction. :)
@ggcc32612 ай бұрын
Man… it annoys me so much that something so nice as C# can be made by a company so horrid as Microsoft. I greatly prefer C# over Go yet highly dislike Windows. Which is annoying since VS offers arguably the best debugger for .NET.
@guruware86123 ай бұрын
Software engineer for over 45 years now, and getting tired of always the same question. Is spanish a better language than english? Yes, if you are a spaniard. If you need Go then 'go' for it. Otherwise use what you already best at. If you are afraid of pointers and need a garbage collector (to clean up the room like mommy did), maybe its time to reconsider the career choice taken. After all, its just about your skill set. Why learning russian, if you possibly will never need it. Apropos garbage collectors, we had a big lag in a web-app, guess what caused it... the java-garbage collector. Still using c++ for 99% of stuff, and there is no need to use all that "modern" c++ mumbo-jumbo which makes the code barely human readable. And it is portable, where c# isn't that much so.
@GavinLon3 ай бұрын
Thanks so much for sharing your experience and perspective. It is greatly appreciated :)
@mikolash82463 ай бұрын
For an engineer with 45 years of experience, your statement about a garbage collector is extremely idiotic
@rankarat3 ай бұрын
C# is not portable? You haven't written any C# lately.
@tanzimibthesam58613 ай бұрын
Go is mostly used in DevOps space C# literally has everything GO has with a vaster ecosystem. But in terms of OOP C# is way above. Cross platform way more versatile.
@GavinLon3 ай бұрын
Thanks so much for your insight :)
@dyto22873 ай бұрын
OOP is the reason why I quit C# & Java. Absolute waste of time. Only good for junior, mid engineers who go to their cubical and wait for their salary.
@roccociccone5973 ай бұрын
lol you literally just said Go, a language which is in fact not OO is worse at being OO. What a genious remark, C# is not good at being functional either. Why? because it's not a functional language for crying out loud. ( I know go isn't functional it's an example)
@sadiulhakim78143 ай бұрын
My opinion is, for small applications golang would defeat c# for its speed and small memory usage but for large applications it would be defeated.
@GavinLon3 ай бұрын
Go - I think is great as you say, for smaller apps but also smaller units of code (microservices). The small memory usage and efficiency makes it quite an attractive alternative to other languages for creating microservices that run in the cloud :) C# is great for enterprise, complex, large applications.but if you want high performance in small units of code (microservices) perhaps Go is a great alternative.
@antoniusivan87673 ай бұрын
Cross Platform? Golang as AOT lack of runtime, make it harder for it to become like React Native/ MAUI. For Enterprise, there is incentive to do full stack app.
@GavinLon3 ай бұрын
I think Go could be a choice for server side development where you are development scalable systems and need to efficiently handle concurrency :)
@yogibarista28183 ай бұрын
Like MAUI ? - Be careful what you wish for... "what do you mean you've run out of memory again ?"
Predictably C# gets my vote but I would love to do a deeper dive into Go! :)
@wahidurrahman773 ай бұрын
Why does GoLang Syntax look not mature like Python but C# syntax is more mature... what about the more matured language Rust??
@GavinLon3 ай бұрын
Rust comparison coming soon! :)
@YaserFarid2 ай бұрын
I was using C# till a few months ago, the problem with C# is that I can't program small microcontrollers in C#, they can be but the overhead is very large. Go provides me with smaller executables and very simple-to-write code (which is something I do not like) Go it very repetitive. I thought about C++ but it is trying to kill ant with a cannon, I thought of using Rust (too annoying), Zig (didn't enjoy it) and I was left with Go or C#, I think I'll go with Go.
@GavinLon2 ай бұрын
For small devices, to optimising resource usage efficiency is of course important - perhaps Go is the best option. Please let me know how it works out for you :) Thanks for sharing your experience and insight!
@WillEhrendreich3 ай бұрын
oh ooh ohhh. do #fsharp next! it's absolutely the best. :)
@GavinLon3 ай бұрын
FSharp comparison must happen :)
@batiandanielliu35982 ай бұрын
C# is not really compile binary , it's just some kind of code using microsoft library , it belongs to the category of python, and node js, like script language , and microsoft control the .net framework and let them full of vulnerabilities , years later, so you have to rewrite the code, or do upgrade, and .net framework may change a lot, you have to learn again, maybe have to purchase new version of windows, it's well designed repeat selling system . well go is really compiled binary code as product , no frame work as dependencies . C# is good for build for enterprise software for quick, but not good for a final software product for sell.
@GavinLon2 ай бұрын
In my experience .NET is very robust. It is mostly JIT compiled (Just-in-time compiled) but can in some scenarios be AOT (Ahead of time compiled) so it is not an interpreted language like JavaScript or Python. C# is also a strongly typed language unlike Python and JavaScript with are dynamically typed languages. C# and .NET is great for a variety of types of applications, and is also great to learn if you want to become a professional programmer. I've been programming using C# for over 2 decades. :) C# is an excellent programming language :)
@batiandanielliu35982 ай бұрын
@@GavinLon .NET code is essentially a "script" language that gets compiled into a simple binary format specific to Microsoft. It’s quite easy to decompile or reverse-engineer, and there are many tools available that can extract the complete source code from compiled .NET code-unless obfuscation is used, you can have a try. I've been using .NET since 2002, and it's a great programming language. However, one concern I have is that when I deploy .NET code on a server, it may work perfectly at first, but vulnerabilities can be discovered years later. Since my code depends on the .NET framework, any vulnerabilities found in the framework itself could impact my code. If I don't update my code or upgrade to a newer framework version, it can lead to security issues. This adds to the time, effort, and cost of maintaining a system built with .NET code.
@batiandanielliu35982 ай бұрын
@@GavinLon .NET code is essentially a "script" language that gets compiled into a simple binary format specific to Microsoft. It’s quite easy to decompile or reverse-engineer, and there are many tools available that can extract the complete source code from compiled .NET code-unless obfuscation is used. I've been using .NET since 2002, and it's a great programming language. However, one concern I have is that when I deploy .NET code on a server, it may work perfectly at first, but vulnerabilities can be discovered years later. Since my code depends on the .NET framework, any vulnerabilities found in the framework itself could impact my code. If I don't update my code or upgrade to a newer framework version, it can lead to security issues. This adds to the time, effort, and cost of maintaining a system built with .NET code. you can look at this video talking about it: kzbin.info/www/bejne/joatamiei8-GaJI
@batiandanielliu35982 ай бұрын
@@GavinLon .NET code is essentially a "script" language that gets compiled into a simple binary format specific to Microsoft. It’s quite easy to decompile or reverse-engineer, and there are many tools available that can extract the complete source code from compiled .NET code-unless obfuscation is used. I've been using .NET since 2002, and it's a great programming language. However, one concern I have is that when I deploy .NET code on a server, it may work perfectly at first, but vulnerabilities can be discovered years later. Since my code depends on the .NET framework, any vulnerabilities found in the framework itself could impact my code. If I don't update my code or upgrade to a newer framework version, it can lead to security issues. This adds to the time, effort, and cost of maintaining a system built with .NET code.
@MuhammadHosny02 ай бұрын
No way you said scripting language 😮
@dovh493 ай бұрын
V is a better Go. Well, I'm not 100% sure about that. But I do really like V. I can't wait until it hits 1.0!
@GavinLon3 ай бұрын
Thank you for sharing your opinion about V - that is an interesting language I'd like to explore :)
@bouboul359726 күн бұрын
3:11 is "unsafe" code really used in other places than the STD? That's an argument I don't understand. If you really want to deal with pointers, use a low level language.
@GavinLon26 күн бұрын
Here is a basic example - The advantages of using managed code come with performance costs. For example, when you retrieve an element from an array, let's say its fourth element, the runtime needs to do a check to see if there is a fourth element, and throw an exception if there isn't. With pointers that runtime cost is eliminated. So higher performance is the reason to use pointers (unsafe code). You might only have a few exceptional cases where you want to use unsafe code (for performance reasons) - which means the vast majority of the project will benefit from using managed safe code - and those exceptional circumstances where you need high speed performance, you can implement appropriate unsafe code in those cases. As to what language you use depends on your requirement. It might be better to use a managed language like C# for a project where you only need performance benefits in a few cases, and a cost/benefit analysis reveals that the benefits of using a managed language outweighs the benefit of using a lower level language (which could be more complex, result in longer development time and potentially less robust code).
@emmanuelatikese36453 ай бұрын
Go is simple, boring and yes it gets things done really quickly.
@GavinLon3 ай бұрын
I'll definitely have to do a deep dive into Go in a future video :) Thank you for sharing your experience with Go.
@dyto22873 ай бұрын
Many say Go is "simple" but most of them can't write idiomatic Go and have no tests. I would say it takes minimum 5 years of Go experience to write a good quality code. Lots of Go programmers think they know Go but actually they are just writing it with a stinky flavor of their previously used programming language.
@GavinLon3 ай бұрын
@dyto2287 Thank you for your insights :)
@emmanuelatikese36453 ай бұрын
@@GavinLon Nice to hear from you again 👍
@AndreCarneiro6663 ай бұрын
Different worlds!
@keyboard_g3 ай бұрын
Oh gosh… Tiobe Index. Its not a real metric.
@GavinLon3 ай бұрын
Yes - it can give you somewhat of an idea of the most popular programming languages but I certainly wouldn't rely on it for any serious decision making :)
@omarbousbia69163 ай бұрын
nice comparison.
@GavinLon3 ай бұрын
Thank you! :)
@judewestburner2 ай бұрын
Not sure I even know how to spell Go 😉😉
@DavidSmith-ef4ehАй бұрын
C# is better because of LINQ and Entity framework. If you don't need it because you are doing something simple, then GO is better.
@GavinLonАй бұрын
Thanks so much for your feedback :)
@pkop43 ай бұрын
Yes it is
@GavinLon3 ай бұрын
Fair enough :)
@nour-eddineoumakhlouf52962 ай бұрын
In my opinion, C# is very confusing.
@GavinLon2 ай бұрын
If you start with the basics and go through the language step by step (at your own comfortable pace) - the concepts will become clearer as you go. It's a great language to learn if you stick with it :)
@nour-eddineoumakhlouf52962 ай бұрын
@@GavinLon I deeply "love" the language , but there many concepts , ASP, Blazor, Xamarin, LINQ,etc. I tried many times to switch to another language but it's something like "love at first sight!". I'll take my courage on my hands ans restart again. Thank's a lot. I also appreciate your tutorial about Resolve !
@GavinLon2 ай бұрын
@@nour-eddineoumakhlouf5296 Please don't loose heart. :) Try not to get frustrated if you don't understand a concept - just keep trying :) Another option if you are getting frustrated with C# is to learn Python . It is a great first language to learn - and once you are proficient programming in Python you can always return to C#, if you still want to learn C#.
@botyironcastleАй бұрын
go lacks a LOOOOT OF things...
@boot-strapper2 ай бұрын
Go is way better and it’s not even close
@GavinLon2 ай бұрын
Thanks. Great to get some positive feedback for Go!
@MrOboema3 ай бұрын
Long story short: yes.
@GavinLon3 ай бұрын
Maybe that could have been the video - me just saying "yes"!
@roccociccone5973 ай бұрын
Long story short: No
@botyironcastleАй бұрын
this is not very practical
@GavinLonАй бұрын
Its an overview video :)
@svetlinzarev345325 күн бұрын
Rust is better than both
@GavinLon25 күн бұрын
Thank you for sharing your point of view :) Rust is a great language!