C# definitely has more features, but sometimes I think they add anything they can think of and because of that language become bloated and there are so many ways to do one thing.
@@pavelk3975 it doesn't really matter if the language is bloated (or rather, the stdlib). The issue I often see with people pointing out how bloated some languages are, is the fact that they try way too hard to keep up with the latest trends on how to do everything, and while it is satisfactory to know these novel ways of achieving results you have done before, as long as it doesn't invalidate the way you already know from experience, it doesn't really change the fact that you can still achieve these results with the ways you already know work and can be implemented without facing any unknown circumstances. In the end, no matter how much more efficient the newer methods might be, it is worth nothing if the application you are making doesn't require of it. What I am saying is, you have to know when to rely on your experience with a battle-tested method instead of looking for whatever the new shiny thing offers, this pretty much applies to anything in life but specially in software development.
@@pavelk3975yes, it has the same problem as C++... just tack on anything that's cool for the hour in CS and go with it. C# used to be a much cleaner language years ago.
My cousin started his career working as a government contractor using. NET, then went on to do .NET in the legal industry (court systems), then went on to a consulting firm where he worked with on a medical project. And now he works for a payroll company. No joke he basically got the .NET triple crown.
funny, I've done C# from low level security, high frequency stock quotes and controlling heavy machinery, I.e. trucks, buses, ships. there's nothing intrinsic in C# for those stupid industries except the workforce availability derisking. I've had a company rewrite a stable project in C# simply because it was written in a very fancy language with very limited workforce like Elixir.
I remember using C#'s LINQ for the first time many years ago and being completely blown away. LINQ is C#'s built-in language support for querying and manipulating data which uses functional programming concepts.
Most of the time the perf doesn't matter though. I never had that LINQ was the actual bottleneck in a business app, it might be slower than hand rolled loops but its still very fast.
I'm so happy to see some C# love from Prime, I write it as an enterprise dev and honestly I think it's one of the best OOP languages out there. I'm also learning Rust on the side but I think OOP is actually a good fit if you're modelling super complex domains & using DDD to manage that complexity
After writing Java almost exclusively for the last 6 months I've been more interested to check out C#. My impression, though I don't know if it's true, is that C# is essentially Java with less bullshit.
Just a note that Nick has a similar video to this but released very recently, maybe a couple of weeks ago. But this one you watched is 2 years old. In the newer one he does talk about how the performance has gotten even better because Microsoft are trying to shake these old mindsets and the way to do that is by being actually good and fast.
By going from a C# job to a Java job, I can say that C# is way better than Java. I might not use it for a hobby project, but as a work language it's fine.
I learned to appreciate soooome things about Java like its consistency in syntax, but oh god would I rather write in c# or kotlin. Boilerplate code is the bane of my existence and it’s like 80% if Java code
@danielhalachev4714 I mean, something like LINQ is an easy example off the top of my head, Entity Framework, Reflections. all those things are very useful. And it's just much less boilerplate, easier to write stuff. I did a lot of Java early in my career and in college, but now I work mostly with C#. And I have to say C# feels much better
@danielhalachev4714 Of the top of my head from the syntax things you'll notice right away: properties, async/await, operator overloading with implicit and explicit operators, extension methods, nullable types with the null-coalescing operator, and so much more that's being added every month it seems. Something I also personally hate in java is template type erasure and it not having it's own IDE (the best one is proprietary and cost like $100+ if you want to keep at least a version of it forever)
@danielhalachev4714 Structs, non-elided generics, advanced types/lists pattern matching, async/await, auto properties (and syntatically more appealing properties in general), native iterators, extension methods, operator overloading and cast overloading, optional parameters, objectively stack-only arrays and types (structs), opt-in native memory management with pointers and memory allocation out of the garbage collector (in .NET 6+) and more. Just the non-elided generics on itself are already huge compared to Java, try comparing the performance of a list of bytes in Java using List vs a list of bytes in C# with List, it is not comparable at all.
The most underrated feature set of C# is its metaprogramming. Between Expression, reflectable attributes, non-elided generics, and Roslyn extensions, you can do a ton of interesting runtime or compile-time code generation. No other language in its class is close.
Furthermore, the entire dotnet ecosystem receives versions with new features relatively quickly and it is clear that it is influenced by the competition.
I use C# to develop extremely high tech optics software. There are soooo many libraries for everything you could ever imagine. We use full functional programming using LanguageExt and it’s so awesome.
WHY ARE YOU NOT USING F#?!?!?!?! LanguageExt is great if you need it to gain FP adoption. But if you're doing FP all the way down, why wouldn't you just use F#?
Thanks for pointing me to that! I have seen it in the past. I’m curious about @JonathanTheZombie’s experience, though. And I’m not sure which part of the FAQ does/doesn’t apply to them. ETA - Cool Cid avatar
C# was my first introduction to the kind of functional programming that people love in Rust. The only reason I switched away from C# is because I got deep into graphics programming, and at the time C# did not have great SIMD instruction support. Funny thing is, I recently used C# for the first time in almost a decade to make a small flashcards app for a family member. I was able to whip up a great WPF GUI with a bunch of features in just a few hours. Super easy to make static text selectable and scrollable, and to make the UI resize in a sensible way.
I’ve been working exclusively with WinForms for the last year and a half, and it makes me miss WPF. I never went super deep with it, but the MVVM pattern and intuitive data binding are so much more productive.
He is an amazing guy. I professionally develop in C# and I have been on it since almost when it was born 20 years ago. But his videos are still really useful as there are always new things to learn. How I also started watching Prime's videos was related to my strong interest in the Rust programming language and because how I do toooo many things in too many other languages and technologies too. :)
He is not, he is classic bad .net dev, that cannot solve even simple problem, and the shit he’s talking about are for newbies that doesn’t know anything about programming, he’s a bad dev with no technical skills, trying prove that c# is special when it’s just garbage collected language general purpose language and has fairly small community of people reinventing the wheel. When you got job you’ll see how shitty code is usually written, how many resources meaning time, money, cpu, memory wasted on simple crud services and full of people talking that they doing clean architecture when in reality just a crud, and they making huge money claiming they’re industry software engineers 😂❤
Yes, he is. But sometimes he's a bit too much of a fanboy :D Don't get me wrong, C# is my No1 language, but some of his videos trying to hype certain things about C# which aren't worth the hype. Nonetheless he always brings some obscure new features to my attention. Many of them I'm not using anyways as I'm usually coding in Unity and it does not use the latest and shiny version of C# and I like backwards compatibility (I hate software that doesn't work half a year later / earlier). Too many people blindly hopping on the train with every single new feature.
I started programming in JavaScript two years ago, watching tutorials, reading articles, documentation, etc. However, I always had difficulty grasping object-oriented programming (OOP) concepts. With JavaScript, especially in front-end development using ReactJS or vanilla JS, there is a strong emphasis on functional programming. So, while I read about OOP, I felt a bit lost when it came to coding. With C#, I gained a solid understanding of OOP, aided by excellent documentation from Microsoft. I also found it beneficial to step away from the clickbait videos often found in the JavaScript community. In the .NET or C# world, explanations are typically provided by experienced professionals who focus on what truly matters to become a skilled programmer.
In Brazil a LOT of banks use C# in their backend. And i mean a LOT. The ecosystem itself provides so much native stuff to build your whole application. Also it's a lot of fun to write c#/.net code.
What I like about C# is because it's usually being used in corporate or big company, with many devs dealing with complex domains, the community always looking for ways to improve developer experiences. I've never been exposed to DDD, CQRS, Vertical Slice, Outbox pattern, and many similar other "fancy" terms when working with js, python, go, or php like in C#. They always strive to write good code 😊
C# dev here. I am a full-time game developer, but have shipped backends, console(terminal) apps, console(xbone/ps4) games, PC/mobile games, mobile apps, tons of API backends, social media bots/media converters/transcribers, dynamic websites (C# in browser with blazor), and a cross-platform single-file CI/CD system that runs on windows, linux x86/arm. Even a few console apps running 24/7 on my 700mhz Raspberry pi 1 through mono. All of these I've developed in pure C# without that being in any way less than a first-class choice for the targets. You CAN NOT say that for your language.
Any advice for someone finally feeling like they can succeed in learning C# and wanting to build their future employability? I'm practicing C# with personal gamedev projects but I'm open to getting a deeper understanding of the language for more practical or commercial application.
@@Jonatron101 The way I first got hired back in the day was through learning Unity and writing C# that way, building connections in my city through school and IGDA meetups. The Unity avenue is a bit narrower nowadays, but just writing code and making public repos of the better personal projects with a concrete focus that you've worked on on your free time would already look quite good to many employers looking for junior devs probably.
Embedded software dev here and I just find that familiarity and comfort switching between C and C# three times a day 😂Can never do that with C and Python. To me, the combination of C and C# can meet 95% of the software needs of my workplace, including all of the things you mentioned above. When I have to do some non-serious scripting or some web development I turn to Python and Javascript. Otherwise C and C# are perfect for me!
I've used C# for my entire career (not exclusively) and I love it. The only thing I've missed is aot and now they have started giving it a serious go❤❤❤
AOT compilation has existed for a long time with mono, but yea good to get better and better support from .net core now with trimming etc I use AOT compilation on a xamarin.mac project (would now be MAUI I guess) because that uses mono internally.
Same here almost from the start 20 years ago. The statistics shown in this video here where from 2021 I understand. Pretty outdated. I have seen an new video about DotNet 8 from nick with new statistics how the APIs are now so much faster than ANYthing else. So things have totally changed. The team has done some amazing work to use a ton of low level stuff making things defeat everything now.
@@caspera3193 I like Kotlin, but to me it doesn't feel cohesive so much as it feels like they just threw every single feature they could think of into a pot and made a stew. C# feels significantly more polished.
@@caspera3193 Not really - not anymore. Java is really catching up with Kotlin, esp. after they got virtual threads and now with Valhalla / Panama projects.
I'm a "taught" Java dev. When I entered the market, I wrote in Turbo-Pascal/Delphi (which unironically is still one of my favorite languages ever) and I am now a C# dev. I would choose modern-day C# over most languages I programmed in professionally. .Net Core has solved many of the common issues programmers complained about regarding C#. Even the late .Net Framework versions are quite nice to code in
"If I already know go why would I want to learn C#" C# is a very special language in the "C family". It's the most reflective language I've ever used (that has a strong type system), it allows you to do use the type system dynamically, it has built in support for running its own compiler tools at runtime, it allows you to manipulate code as data with Expressions, it has an extremely strong foundation of data tooling in LINQ, it's pretty fast, and the tooling is fantastic. It's got good support for async programming, functional, event based and object oriented programming too. Every year, it gets better -- particularly with pattern matching recently. It is a fantastic language, and is worth learning even if you already know C, C++, Go, Java or Swift. It's a ton of fun too, it gives you so much power.
I started out learning dev with actionscript J's / php and quickly moved towards the unity engine and learned C# and I feel it's just an incredibly intuitive language to use. I later learned more webdev, i.e javascript > express + handlebars > react > next.js. and even now, For me c# is like the perfect 'vanilla - plus' programming language.
C# of today is such a different language than 5-ish years ago. Personally I'm a huge fan of all the new features that makes writing in a functional style easier. It's interesting to take someone who has been stuck in C# 6 due to whatever reasons and show them how to do the same thing with the latest release of the language and get their opinions / reactions to it. My favorite is showing them records. Albeit not perfect but showing them "look at the few hundred lines of code it took to support all of these things with this type. Now I can have the same thing just by calling it a record and using a handful of lines."
@OOpSjm Definitely. It's almost like you have F# which is functional first but supports OO and now you have C# which is OO first but supports functional. Two languages with a main paradigm with support for the other.
@@logank.70 Now just to convince them to add proper discriminated unions 🙃 You know it's inevitable, I know it's inevitable, they know it's inevitable, so what are they waiting for?
@@alextrollip7707 I used it as a learning tool. I wanted to move away from the OO world that I had only known and try to do various exercises with a functional language. I learned to appreciate some of the languages defaults, like immutability, and took some of those concepts from playing around in the language to my day-to-day C# job.
C# have limited ORMs because EF is literally the best ORM to have ever been created and integrated with a language, no joke, across all languages. And I'm not saying that like I've literally tried every single one to ever have existed. But I've tried the ones who are praised in other languages for being good, and some that are mid, and even the "good" ones are laughably terrible in comparison.
LinqToSql is still better ORM than EF. And it has not been updated since 2008-2010. It was capable extract and update only changes done to the records in a table in 2008. EF got this only relatively recently. And stored procedures support from 2008, better that EF stored procedures support today.
I always say EF Core instead of just EF, to make clear that I am not talking about the old version. It's really great indeed but also because LINQ is great (how it allows to be translated into actual SQL commands for the database, apart from the enumerator implementation which is also great). Though I recently explored Dapper, because at work I still have to maintain a lot of both really old applications that used any ORM but just plain SqlCommands (or when worse the absolutely horrible Typed DataSets thing of VS that should have never existed on this planet), as well as a lot of really small applications for simple tasks for which setting up a large ORM is an overkill. And I can say I really like Dapper too actually, because it's so simple. And I think for small applications it's the most easy thing to use. Unless you really have a problem with writing a bit of actual SQL code. But I think the C# Raw string syntax made that a lot better these days too.
FINALLY. Thank you for giving some love to C#! ❤ I develop in C# almost since it was born 20 years ago. It's good to note something though, at a regular base I watch Nick's videos these days. The statistics shown here where from 2021. With the new improvements in dotnet version 8 which they made everything has totally changed when it comes to performance. Nick has also posted a video how the DotNet frameworks are so much faster than Everything Else. Maybe that statistics source has some problems like you say, but it might still be worth to at least know about. They have done a ton of low level performance improvements in the last two years. It's also good to notice that in general there are more options in dotnet for this than in Java, because of the concept of Value Types, which are not allocated on the heap and no subject to the garbage collector. I know Java has started to implement similar concepts as well, but it's as far as I know not as deeply implementend in everything as in dotnet. This is a major difference.
Yes, LINQ is baller. In a past company we wrote everything in C#, we were a giant logistics company. Our Web projects to the back end roboter routing services were all in C#. And they did run on linux docker containers. So these days I'm less dogmatic and just say pick your poison. I still prefer to write Security or performance critical code in C++ :).
I do a good amount of F# development these days. I do it on arch Linux in neovim and everything works pretty well. It's basically a slightly more pragmatic ocaml with a much larger ecosystem attached to it and MUCH better documentation. The documentation (or lack there of) and the module system are what turned me away from using Ocaml for real projects.
@@sachindraragul1094 I'm sure some people have. I hated it. The way you end up having tons of dune files spread all around your project. Plus what basically amounts to header files for access restriction. Fsharp just feels more modern me. You defined namespaces and modules in your files and they're just available to import in other files. It's not a perfect system either, but it makes a lot more sense in my mind at least.
@@sachindraragul1094 for sure, the language is excellent and it's definitely worth learning. I just found myself really annoyed with the lack of documentation for even the more popular libraries and a lot of the tooling was just a little difficult to understand. I'm sure I would get used to it after a while. But there was just too much friction there for me. Especially when I knew I could switch over to fsharp and write VERY similar code with a better ecosystem and docs. Plus the community is really friendly. After you feel comfortable with ocaml, give fsharp a try and let me know how you like it.
I was making a game in Unity as a hobbie. Then in september, because of the Unity fiasco, I switched to using Monogame. Have to say, working with C# and Monogame is a really good way for me to put into practice what I have learned about Design Patterns an OOP. Back when I was developing with Unity, it felt as I wasn't really programming with C#, just writing snippets and scripts that would be linked through the Unity UI.
Comparison between Monogame and Unity in your opinion?(and Godot if you've taken a look at it) I was debating trying out Unreal even, but learning c++ for just a hobby piece seems like alot of work for not alot of benefit
That is kind of the point of a game engine like Unity. You aren't coding everything, you are just writing behavioral scripts, and Unity handles the hard stuff behind the scenes.
@@evancombs5159 And by "hard stuff" you mean boilerplate, and ridiculous one at that. Unity's Entity Component System is atrocious and an offense to all programmers.
C# meta programming is pretty good. Reflection, code compilation, etc. My main complaint about C# is that its got too many ways to do the same thing: and its getting worse with "features" such as primary constructors
These are facts. What further frustrates this situation is that C# devs seem to be some of the *most* difficult to convince to update their skill set, so then you have new language features that are meant to help improve how we work with it and it's only partially adopted so you feel like you're in a polyglot codebase when you're looking at a single language 😔
It suffers the same "death by a thousand features" c++ is experiencing. What I like about java is that they are very cautious about this. They put every suggested feature on the scale of usefulness and added complexity. And many on the first look great features die on that scale. Also many features ruled out by the scale find themselves being picked up again once a better way is found to integrate them better. For example string interpolation was rejected many times. Now that the idea of String template processor was accepted interpolation is implemented using this feature with the reasons for rejection solved by this choice.
Been binging your vids as I recently found your channel (self-taught programmer who started with c#) and hearing you talk about pattern matching like that was wild. It's kind of just a normal thing for me at this point. I can totally agree though, even knowing how to use it and when to use it, I feel like a wizard every time. lol
Using C# and Godot (did port my project from unity) for past three months, been a really smooth and nice journey. I'm thinking to try blazor which is probably a better way to do frontend instead of React.
A similar story here. The thing with C# is that it's really easy to get into it. I've been working on a plugin for Godot and it only took me around 4 days to port it from GDScript with no prior experience. Truly, it's the superior Java.
Blazor itself works just find but I'd advise to go with Svelte if you just want to not be a React Andy, or HTMX. Finding a UI library for Blazor is hard (unless you Bootstrap)
@@phamlong4210 MudBlazor? Radzen, Blazorise, And Design Blazor, SyncFusion. How many do you need? - I prefer MudBlazor as it's free and performs the best.
I switched to Linux a time ago, im still still pretty much a Microsoft guy and still program in C# because of work, it works great on both Linux and Mac. BTW if you need SQL Server you can fire up a Linux based container so except for desktop (Windows) apps, you can do pretty much anything with C# outside of Windows
12:10 A use case I see for this (sealed permits) is to emulate a union type, for example a Result which I only want to be derived either as a Success or a Failure but I agree it feels like a weird inverted way to program to specify who can inherit a class at declaration.
2 місяці тому
Only a sealed type hierarchy makes pattern matching safe and usable for algebraic data types. A Maybe can only be a Some(foo) or a None. A Tree can only be a Node(left,right), a Leaf(val) or Empty etc.
C# is heavily used in Game Development across many companies, including internal game engines, from CI/CD to build, project generation, 3D/asset editor, and "scripting." C# is also used with microcontroller/embedded/iot
Its wild that C# is at rhe cutting edge of a lot of language features and still has unmatched async (better than js by far). Other langiages are borrowing from it now
As someone who came out of college not that long ago and took multiple semesters of Java and C#, my takeaway feel and knowledge was that C# was a superior Java. A large part of that is the environment and integration. I'm too removed from Java to comment on it, but the future of C# and .NET is really bright. Full stack Blazor that can utilize web assembly and server-side signal R in the same application is going to be seriously powerful. AOT compiling directly into native code like Go and C++ is awesome as well.
This also highly depends on what country you work in. In the Netherlands it's mostly C# for most dev jobs. Including the "fun" sectors. Including for giant global companies. Not that you do not see a huge amount of jobs for other langs.
I'd pick C# or F# over Java any day. I have been using C# in enterprise environment on Linux servers something like 15 years already. During Mono time there was occasional hiccups, but nothing major hit our apps. Since dotnet core was released years ago it has been smooth sailing and I couldn't be happier. Except maybe we should rewrite our things with Rust =D
I started with C# and because I have my fancy looking VS Code, the effort to compile C# Blazor made me look at other languages and fall in love with golang. OMG, this is like how my brain expected C# to work and then forced into all this OOP stuff “Just Because” or “Standard way of doing stuff”. Anyways I went into Golang thinking better php and got my mind blown by finding out it didn’t need a runtime environment. Structs is how I always wanted to use Classes. It just felt so so so much more natural to code in.
my take is, C# evolved to be what Java should've been, also 18:40 the graph is purely for most loved frameworks to work with, so its doesnt relly matter what they do as long as people like them.
C# is my main language but I can see how some one just getting started could be confused. A top level program looks like magic lmaooo if you don’t understand it.
I was a programmer for 25 years and retired. I watch this channel because at this point it's so interesting to see the same discussions/problems on repeat. AND, I LOVE the jargon. It's how I know I'm already outdated. Ass pennies, hilarious. :)
Same situation but 37+ years. I only code on hobby basis these days. Yeah, and I watch this channel for the same reasons and have come to the same conclusions. ;)
Modern C# is a good language, with probably one of my favorite syntax and standard library. But with some historical baggage, bad crossplatform UI options and god awful tooling in MsBuild.
I don't know about the bad cross platform UI options (I develop mostly for Web and background workers), but the tooling is so much better since .NET Core came out. Nowadays I develop mostly on NeoVim+tmux running on WSL2. I still go to VS Code when I need decent debugging, but apart from it, dotnet CLI works just fine.
One note about sealed classes (and interfaces, this is available for interfaces too) in Java. Essentially, they're a (rather clumsy) roundabout way of achieving tagged unions in Java (like enums in Rust), which can be useful for exhaustive pattern matching. Basically, you might see code like "sealed interface SomeUnion permits VariantA, VariantB {}" and then if you do a switch on an instance of SomeUnion, assuming non-null (god i hate java and all it's old baggage), you'll be guaranteed to have an exhaustive match as long as you match against VariantA and VariantB
ITO cross-platform stuff, well, I run my .NET Core APIs on Alpine Linux containers in prod. We handle like $2bn worth of transactions a year. So, it's definitely production-ready cross-platform.
I got to take part in an F# project at work. It was great. The only major thing that's missing is type classes or something similar (and maybe algebraic effects). Anyway, if I got to choose the tech stack for some corporatey service/backend I'd go with F#.
C# can run about anywhere but at it's core its still Windows programming. You are required to have the .NetFrameWork on you pc to run it. For now, the terms seem acceptable but Microsoft has a tendency to not respect user choice. Microsoft holds C# back as its creator. C# is better than Java, but I am still rooting for Java to make a come back.
I've gotten job offers where they pay a premium specifically because I have experience with both C# and Java (building enterprise apps and APIs). Recruiters have told me it's hard to find someone that can (or will) work with both, which is strange to me considering how similar the two languages are.
I do C# primarily and have for several years now, and honestly I love it. It's my favorite language and has been for a while. Sure, it's not for the people who need absolute balls-to-the-wall performance and can't handle GC pauses. But for a lot of use-cases with webservices, background services, docker containers, etc, it really is pretty great. If you need one of those "Java-like" languages for your project, I would recommend C# above other similar options.
Been coding C# for years. (Swapped from Java in 2014) And I was always curious as to why your take on C# is bad was there. I'm glad it was more a casual ribbing than an actual bad language. Cause I genuinely enjoy it more than any other language I've used. My only complaint is usually that there's just usually more code to do a thing that other languages. Boilerplate is heavy. But the code looks good, makes sense, and it clicks for me. With the side bonus of Godot, Unity, Maui/Xamarin also working with pretty much the exact same ruleset and standards. Means I can do those as side projects and gain mastery for my actual job at the same time. Tried a JS job. And in comparison I just wanted to tear my hair out. Although could have been the company. But the styles are so different is it a tough thing to swap between.
I've written code in both C# and Java. In my opinion, C# is easier to write and understand and it's extremely useful when you want to dig deep into Windows (of course by utilizing Win32 API). Java on the other hand runs on JVM and has little capabilities to work with the OS kernel. And you have little room for errors in C#, most of the errors are detected right in compile time. LINQ existed long before Java introduced its Stream API. CompletableFuture is some hard-to-use C# Task imitation. Using Java you write more to do less. You have to write a lot of boilerplate code to do the same thing. When you work with Java for a while you must know how to optimize the JVM options or your app will run out of heap memory sometime.
The guy totally misrepresented the Quora post at 5:08. The post was saying "this is how things were in the past" but if you read down, it literally says that things are better now with mono and xamarin. But this guy makes a point of mentioning that this post was written in 2017 without mentioning that they are talking about the past in the first part of the post. Learn how to read.
C# is a great language with many support, It one of my favorite programming languages to this day, with c# LINQ expressions being a big plus, I try java, python, c and c++ but still love c#
I’ve worked at my fair share of “enterprise” companies, and yes, the C# finance/government, stereotype is true. At the company I currently work, we’re .Net containers in alpine. If you asked me that just 3 years ago I would’ve drop kicked you. It’s staggering how quickly MS is improving .Net. I mean, the new features in .Net 8 are just insane, it’s like an entirely different platform. The fact that I’m coding, building, testing all on Linux with minimal configuration still boggles my mind. That said I still prefer Go, something about it reminds me of C, makes me feel like I’m in full control with minimal baggage.
21:30 I agree. the C# JIT compiler is very good at identifying and optimizing repetitive tasks, so pretty much *any* benchmark is inherently flawed. Unless your web server always returns the same result for the same input (there's no per-user personalization), your performance won't be as good as the benchmark. C# is still my favorite language though, but a good point is a good point.
It is pretty comparable to the benchmarks actually, because in all codes there are places that can be optimized this way (and variable input does not make the JIT unable to optimize things with like inlining and simd for example).
@@diadetediotedio6918 Benchmarks can be optimized for a simple case because the stand-out case is vastly more frequent than in any real-life situation, if not the sole one, so not really. At most, it shows you the best scenario.
I stated with C# 1.0 2002, and it is still the best all round language you can find so 22 years of none stop experience in that case :-). It is brilliant when you need to refactor anything.
Loads of Java in the Cyber Security space. Knowing that a CVE is going to be fixed if you have paid support is very important. Before using C#, check what patents Microsoft asserts for which components. We have been burned before. I'm very wary now.
12:10 sealed hierarchies are extremely versatile feature. There are tons of things that can be done with the guarantee, that no type outside your library can extend or implement a type. For example you can make finite algebraic types with it. For example the option type: public sealed interface Option { record None() implements Option {} record Some(T value) implements Option {} } This might be more clunky then a rust enum but it has the same user side semantics. (pattern matching) (Btw you can drop the permits if all subtypes are declared in the same file.)
From a person who wrote java before c#. C# was kinda of a revelation. I never though java could be that easy. IDK c# is still really good and works really nice on anything
Abstract sealed classes as added to Java, allow for exhaustiveness checks in pattern matching. With open inheritance, no guarantees can be given by the compiler that the provided cases cover all possibilities. By explicitly enumerating all classes that inherit from the sealed class, the compiler will be able to to do that check. It allows for usages that in functional languages are served by ADTs (algebraic data types). Sometimes all types are known in advance, like for example Some and None in an Option or Maybe type.
Using inheritance to try to code features available in ADTs is an abomination though, even if it allows exhaustiveness checking. Just add ADTs to the language and be done.
Oh ffs just limit inheritence to classes in same package/assembly whatever so they get into one compiled unit. There you go, guarantees. Java people just need to do everything with their asses
It's weird seeing so many comments express doubt about C# being cross-platform. I don't know how to make this any clearer: at home, I code in C# entirely in Linux and frequently deploy to Raspberry Pi. At work, almost everyone uses a Mac. I've worked in all three major clouds, and we always just deploy using Docker and Alpine Linux.
I've been a career C# dev for 15 years. I've met many devs who went from Java -> C# and never went back. I've met many devs who went from C# -> Java on the odd project and vowed never again. The general comment was, it was like flying coach after having experienced first class. So many awesome language features missing. If you're worried about perf, I agree, write C++.
C#'s Task library is far superior to anything in Java, JavaScript, Python, etc. Up until Go (I think), C# was probably the only language with easy-to-use dynamic hardware thread use, where it will scale the number of hardware threads automatically, based on a hill climbing algorithm, to suit your Task load.
Doing C# fulltime now and absolutely love it. Even WPF grew on me. Learned Java initially, but since the fustercluck after 9, I wouldn't even know where to start.
C# is hands down the most versatile language regarding real usage. Languages are just tools, and most languages can "do anything," but you will be hard-pressed to find a language that is as widely used as C# in the enterprise, gaming, mobile, web, embedded, machine learning, etc. For beginners, it's a great first language because of that versatility, type system, tools, ease of learning, etc.
I agree, but, nitpick from me here, it's good to mention that there is something that C# quite obviously cannot, and that is being a real systems programming language. I do not see how it can be used to write an operating system or low level drivers, considering how it depends on a garbage collector and pretty high level library code as well. Even the new AOT way of compiling does not really solve that.
As of 2023, if you only know C#, C/C++ and got some knowledge of Html/css, you can build almost anything software related(desktop apps, web apps, mobile apps, serverside apps, database management systems, entreprise grade solutions, ...) and so much more it is ridiculous.
I hate all the languages I used back in college. Because I sucked back then and didn't have good time using them. I've recently switched to C# from Java and it's my favorite language rn, because I know what I'm doing and there are a bunch of QoL improvements over Java.
C# is so much more than Java. It now has AOT in pre-release, where you can compile your code directly as an executable (no IL). It's essentially like GO. It still has some issues, but it will be great once it's released.
I've used both. C# is far more pleasant all-around. The syntax in nicer. The package manager is nicer. The build process is easier. There are innovative frameworks like Blazor. I've never hit a compiler bug. It's performant enough to be used widely in the consumer and professional trading world. And it interops seamlessly with F#, an underrated ML language. C# isn't cool. It isn't pathbreaking. It just gets the job done with minimal fuss.
Cant speak for anyone else but i have really enjoyed using C#. Picking it up from scratch was a bit tricky as it as a LOT of language level features and syntax. And coming from python, a more strict typed environment led to a lot of learning. But Visual Studio for how bulky it is, works. I have never felt more empowered and it allowed me to make a medium sized mod for a Unity game i really enjoyed in honestly a pretty short amount of time. I really liked that the IDE has so many options for side functionality, like decompiling binaries so you can find hooks instead of having to go search for source documentation. Doing that text editor from scratch challenge btw. Very hard and interesting.
I will always have a soft spot in my heart for C#.. Mono was one of the first open source projects I ever contributed to. (I'm so old, that I had to *fax* a notarized document assigning the copyright of my C# standard library code over to Novell in order to contribute)
Prime is bold enough to disagree with the guy while sitting on his lap
🤣
Bro 🤣🤣
Omg. 😂🤣
cannot unsee 😨
Omg. Gold.
C# is used in loaaaads of enterprise web dev… at this point it’s basically just Java with 10 years of extra features and improvements on top
C# definitely has more features, but sometimes I think they add anything they can think of and because of that language become bloated and there are so many ways to do one thing.
@@pavelk3975as someone who came from Java its a nice problem to have 😂
But yeah you are right
Agreed, it’s Java but with all the silliest trendiest features
@@pavelk3975 it doesn't really matter if the language is bloated (or rather, the stdlib). The issue I often see with people pointing out how bloated some languages are, is the fact that they try way too hard to keep up with the latest trends on how to do everything, and while it is satisfactory to know these novel ways of achieving results you have done before, as long as it doesn't invalidate the way you already know from experience, it doesn't really change the fact that you can still achieve these results with the ways you already know work and can be implemented without facing any unknown circumstances. In the end, no matter how much more efficient the newer methods might be, it is worth nothing if the application you are making doesn't require of it.
What I am saying is, you have to know when to rely on your experience with a battle-tested method instead of looking for whatever the new shiny thing offers, this pretty much applies to anything in life but specially in software development.
@@pavelk3975yes, it has the same problem as C++... just tack on anything that's cool for the hour in CS and go with it. C# used to be a much cleaner language years ago.
My cousin started his career working as a government contractor using. NET, then went on to do .NET in the legal industry (court systems), then went on to a consulting firm where he worked with on a medical project. And now he works for a payroll company. No joke he basically got the .NET triple crown.
The triple crown is government, fintech and startup
".NET Triple Crown"
funny, I've done C# from low level security, high frequency stock quotes and controlling heavy machinery, I.e. trucks, buses, ships.
there's nothing intrinsic in C# for those stupid industries except the workforce availability derisking.
I've had a company rewrite a stable project in C# simply because it was written in a very fancy language with very limited workforce like Elixir.
@@TomNook.what if you work for a fintech startup?
I've worked with C# in engineering, railroad, manufacturing, logistics, maritime, transport, supply chain, oil and gas, robotics, and yes also banking
I remember using C#'s LINQ for the first time many years ago and being completely blown away. LINQ is C#'s built-in language support for querying and manipulating data which uses functional programming concepts.
LINQ is great.
It's becomming more and more functional with each version.
LINQ is in many cases very slow. I hope they fix that since I am a big fan of the sql like syntax for data manipulation.
@@redcrafterlppa303 LINQ got upgraded in .net 8
Most of the time the perf doesn't matter though. I never had that LINQ was the actual bottleneck in a business app, it might be slower than hand rolled loops but its still very fast.
I'm so happy to see some C# love from Prime, I write it as an enterprise dev and honestly I think it's one of the best OOP languages out there. I'm also learning Rust on the side but I think OOP is actually a good fit if you're modelling super complex domains & using DDD to manage that complexity
ma man!
same thing here, i'm just not in the mood to learn other languages but i'm working on that
But OOP is "old tech" and classes are evil and must be avoided at all costs! Even to the point of re-inventing them, poorly. -The Internet. XD
After writing Java almost exclusively for the last 6 months I've been more interested to check out C#. My impression, though I don't know if it's true, is that C# is essentially Java with less bullshit.
@@jeffreyhymas6803 and with more good shit :)
Just a note that Nick has a similar video to this but released very recently, maybe a couple of weeks ago. But this one you watched is 2 years old. In the newer one he does talk about how the performance has gotten even better because Microsoft are trying to shake these old mindsets and the way to do that is by being actually good and fast.
It's about dumping the legacy crap and moving forward.
By going from a C# job to a Java job, I can say that C# is way better than Java. I might not use it for a hobby project, but as a work language it's fine.
I learned to appreciate soooome things about Java like its consistency in syntax, but oh god would I rather write in c# or kotlin. Boilerplate code is the bane of my existence and it’s like 80% if Java code
@danielhalachev4714 I mean, something like LINQ is an easy example off the top of my head, Entity Framework, Reflections. all those things are very useful. And it's just much less boilerplate, easier to write stuff.
I did a lot of Java early in my career and in college, but now I work mostly with C#. And I have to say C# feels much better
LINQ @danielhalachev4714
@danielhalachev4714 Of the top of my head from the syntax things you'll notice right away: properties, async/await, operator overloading with implicit and explicit operators, extension methods, nullable types with the null-coalescing operator, and so much more that's being added every month it seems.
Something I also personally hate in java is template type erasure and it not having it's own IDE (the best one is proprietary and cost like $100+ if you want to keep at least a version of it forever)
@danielhalachev4714
Structs, non-elided generics, advanced types/lists pattern matching, async/await, auto properties (and syntatically more appealing properties in general), native iterators, extension methods, operator overloading and cast overloading, optional parameters, objectively stack-only arrays and types (structs), opt-in native memory management with pointers and memory allocation out of the garbage collector (in .NET 6+) and more.
Just the non-elided generics on itself are already huge compared to Java, try comparing the performance of a list of bytes in Java using List vs a list of bytes in C# with List, it is not comparable at all.
The most underrated feature set of C# is its metaprogramming. Between Expression, reflectable attributes, non-elided generics, and Roslyn extensions, you can do a ton of interesting runtime or compile-time code generation. No other language in its class is close.
Source generators too are amazing.
Exactly. Reflection, generation and everything with Roslyn makes it a powerhouse to work with.
Furthermore, the entire dotnet ecosystem receives versions with new features relatively quickly and it is clear that it is influenced by the competition.
Really underrated and highly unknown features, many people skim over those features for a number of bs reasons that they feel proud about
I don't know much about this, so thanks for letting me know, I will look into it
I use C# to develop extremely high tech optics software. There are soooo many libraries for everything you could ever imagine. We use full functional programming using LanguageExt and it’s so awesome.
WHY ARE YOU NOT USING F#?!?!?!?! LanguageExt is great if you need it to gain FP adoption. But if you're doing FP all the way down, why wouldn't you just use F#?
Could you elaborate on the kind of optics software you develop?
Thanks for pointing me to that! I have seen it in the past. I’m curious about @JonathanTheZombie’s experience, though. And I’m not sure which part of the FAQ does/doesn’t apply to them. ETA - Cool Cid avatar
ARE YOU HIRING?
the .net webmailer library is the top of the class as someone who has setup a few Emailers
C# was my first introduction to the kind of functional programming that people love in Rust. The only reason I switched away from C# is because I got deep into graphics programming, and at the time C# did not have great SIMD instruction support. Funny thing is, I recently used C# for the first time in almost a decade to make a small flashcards app for a family member. I was able to whip up a great WPF GUI with a bunch of features in just a few hours. Super easy to make static text selectable and scrollable, and to make the UI resize in a sensible way.
You can do 3D! Tons of choices out there. We use OpenTK but there are cross platform solutions out there for OpenGL
WPF is a joy, Avalonia is great for cross platform desktop.
I’ve been working exclusively with WinForms for the last year and a half, and it makes me miss WPF. I never went super deep with it, but the MVVM pattern and intuitive data binding are so much more productive.
I love Nick Chapsas. He made my .NET class at Uni a lot easier
He is an amazing guy. I professionally develop in C# and I have been on it since almost when it was born 20 years ago. But his videos are still really useful as there are always new things to learn.
How I also started watching Prime's videos was related to my strong interest in the Rust programming language and because how I do toooo many things in too many other languages and technologies too. :)
Nick is an amazing source for modern C# info. Great channel
He is not, he is classic bad .net dev, that cannot solve even simple problem, and the shit he’s talking about are for newbies that doesn’t know anything about programming, he’s a bad dev with no technical skills, trying prove that c# is special when it’s just garbage collected language general purpose language and has fairly small community of people reinventing the wheel.
When you got job you’ll see how shitty code is usually written, how many resources meaning time, money, cpu, memory wasted on simple crud services and full of people talking that they doing clean architecture when in reality just a crud, and they making huge money claiming they’re industry software engineers 😂❤
Yes, he is. But sometimes he's a bit too much of a fanboy :D Don't get me wrong, C# is my No1 language, but some of his videos trying to hype certain things about C# which aren't worth the hype. Nonetheless he always brings some obscure new features to my attention. Many of them I'm not using anyways as I'm usually coding in Unity and it does not use the latest and shiny version of C# and I like backwards compatibility (I hate software that doesn't work half a year later / earlier).
Too many people blindly hopping on the train with every single new feature.
He is a bit too performance oriented. Sure its important but keeping the code maintainance is often more important
His videos basically got me into programming youtube.
I started programming in JavaScript two years ago, watching tutorials, reading articles, documentation, etc. However, I always had difficulty grasping object-oriented programming (OOP) concepts. With JavaScript, especially in front-end development using ReactJS or vanilla JS, there is a strong emphasis on functional programming. So, while I read about OOP, I felt a bit lost when it came to coding.
With C#, I gained a solid understanding of OOP, aided by excellent documentation from Microsoft. I also found it beneficial to step away from the clickbait videos often found in the JavaScript community. In the .NET or C# world, explanations are typically provided by experienced professionals who focus on what truly matters to become a skilled programmer.
I have simillar feelings and thoughts.
In Brazil a LOT of banks use C# in their backend. And i mean a LOT. The ecosystem itself provides so much native stuff to build your whole application. Also it's a lot of fun to write c#/.net code.
Mano mas eu acho que Java ainda ganha em tamanho de mercado
What I like about C# is because it's usually being used in corporate or big company, with many devs dealing with complex domains, the community always looking for ways to improve developer experiences.
I've never been exposed to DDD, CQRS, Vertical Slice, Outbox pattern, and many similar other "fancy" terms when working with js, python, go, or php like in C#. They always strive to write good code 😊
C# dev here. I am a full-time game developer, but have shipped backends, console(terminal) apps, console(xbone/ps4) games, PC/mobile games, mobile apps, tons of API backends, social media bots/media converters/transcribers, dynamic websites (C# in browser with blazor), and a cross-platform single-file CI/CD system that runs on windows, linux x86/arm. Even a few console apps running 24/7 on my 700mhz Raspberry pi 1 through mono.
All of these I've developed in pure C# without that being in any way less than a first-class choice for the targets.
You CAN NOT say that for your language.
Go and rust
@@vincentnthomas1 Nah I'll stay shiny and sharp
Any advice for someone finally feeling like they can succeed in learning C# and wanting to build their future employability? I'm practicing C# with personal gamedev projects but I'm open to getting a deeper understanding of the language for more practical or commercial application.
@@Jonatron101 The way I first got hired back in the day was through learning Unity and writing C# that way, building connections in my city through school and IGDA meetups. The Unity avenue is a bit narrower nowadays, but just writing code and making public repos of the better personal projects with a concrete focus that you've worked on on your free time would already look quite good to many employers looking for junior devs probably.
Embedded software dev here and I just find that familiarity and comfort switching between C and C# three times a day 😂Can never do that with C and Python.
To me, the combination of C and C# can meet 95% of the software needs of my workplace, including all of the things you mentioned above. When I have to do some non-serious scripting or some web development I turn to Python and Javascript. Otherwise C and C# are perfect for me!
I've used C# for my entire career (not exclusively) and I love it. The only thing I've missed is aot and now they have started giving it a serious go❤❤❤
AOT compilation has existed for a long time with mono, but yea good to get better and better support from .net core now with trimming etc
I use AOT compilation on a xamarin.mac project (would now be MAUI I guess) because that uses mono internally.
Same here almost from the start 20 years ago. The statistics shown in this video here where from 2021 I understand. Pretty outdated.
I have seen an new video about DotNet 8 from nick with new statistics how the APIs are now so much faster than ANYthing else. So things have totally changed.
The team has done some amazing work to use a ton of low level stuff making things defeat everything now.
I also wish they would add string enums
C# is the best OOP language around now. As a Java developer it sucks but that's the way it is.
Try Kotlin
@@caspera3193 tried with kafka streams. Defo not my cup of tea.
@@caspera3193 I do, but still love c# more lol
@@caspera3193 I like Kotlin, but to me it doesn't feel cohesive so much as it feels like they just threw every single feature they could think of into a pot and made a stew. C# feels significantly more polished.
@@caspera3193 Not really - not anymore. Java is really catching up with Kotlin, esp. after they got virtual threads and now with Valhalla / Panama projects.
I'm a "taught" Java dev. When I entered the market, I wrote in Turbo-Pascal/Delphi (which unironically is still one of my favorite languages ever) and I am now a C# dev. I would choose modern-day C# over most languages I programmed in professionally. .Net Core has solved many of the common issues programmers complained about regarding C#. Even the late .Net Framework versions are quite nice to code in
So basically you're an Anders Hejlsberg fan
@@conundrum2u The man made good shit, okay? 😁
@@h3llraizer hell yes
As a senior software engineer with heavy focus on Delphi, I had to give you a like for this comment.
"If I already know go why would I want to learn C#"
C# is a very special language in the "C family". It's the most reflective language I've ever used (that has a strong type system), it allows you to do use the type system dynamically, it has built in support for running its own compiler tools at runtime, it allows you to manipulate code as data with Expressions, it has an extremely strong foundation of data tooling in LINQ, it's pretty fast, and the tooling is fantastic. It's got good support for async programming, functional, event based and object oriented programming too. Every year, it gets better -- particularly with pattern matching recently. It is a fantastic language, and is worth learning even if you already know C, C++, Go, Java or Swift. It's a ton of fun too, it gives you so much power.
C# is the absolute best language for me
It can do anything and runs anywhere
even in places that it shouldn't be
@@phamlong4210 name examples.
@@phamlong4210😂
@@phamlong4210 that's JavaScript
@@phamlong4210in the end, just like Java lol
I started out learning dev with actionscript J's / php and quickly moved towards the unity engine and learned C# and I feel it's just an incredibly intuitive language to use. I later learned more webdev, i.e javascript > express + handlebars > react > next.js. and even now, For me c# is like the perfect 'vanilla - plus' programming language.
C# feels perfect to me, it's my comfort language
Same for me. It replaced Pascal / Delphi years ago for me :D
Though my favourite scripting language is lua
Same. I'm a junior dev and C# is my first and strongest language.
@@hakami1426++
C# of today is such a different language than 5-ish years ago. Personally I'm a huge fan of all the new features that makes writing in a functional style easier. It's interesting to take someone who has been stuck in C# 6 due to whatever reasons and show them how to do the same thing with the latest release of the language and get their opinions / reactions to it. My favorite is showing them records. Albeit not perfect but showing them "look at the few hundred lines of code it took to support all of these things with this type. Now I can have the same thing just by calling it a record and using a handful of lines."
It's easier to write in a functional style because they have been transitioning to a functional style.
@OOpSjm
Definitely. It's almost like you have F# which is functional first but supports OO and now you have C# which is OO first but supports functional. Two languages with a main paradigm with support for the other.
@@logank.70 Now just to convince them to add proper discriminated unions 🙃 You know it's inevitable, I know it's inevitable, they know it's inevitable, so what are they waiting for?
@@logank.70if F# in a "useable" state yet?
It sounded interesting, but I never got around to playing around with it.
@@alextrollip7707 I used it as a learning tool. I wanted to move away from the OO world that I had only known and try to do various exercises with a functional language. I learned to appreciate some of the languages defaults, like immutability, and took some of those concepts from playing around in the language to my day-to-day C# job.
C# have limited ORMs because EF is literally the best ORM to have ever been created and integrated with a language, no joke, across all languages. And I'm not saying that like I've literally tried every single one to ever have existed. But I've tried the ones who are praised in other languages for being good, and some that are mid, and even the "good" ones are laughably terrible in comparison.
I learned .net and EF in uni and I have always missed EF. It's so good
Use eloquent in php
@@hodev632 not even close. Have you tried EF?
LinqToSql is still better ORM than EF. And it has not been updated since 2008-2010. It was capable extract and update only changes done to the records in a table in 2008. EF got this only relatively recently. And stored procedures support from 2008, better that EF stored procedures support today.
I always say EF Core instead of just EF, to make clear that I am not talking about the old version.
It's really great indeed but also because LINQ is great (how it allows to be translated into actual SQL commands for the database, apart from the enumerator implementation which is also great).
Though I recently explored Dapper, because at work I still have to maintain a lot of both really old applications that used any ORM but just plain SqlCommands (or when worse the absolutely horrible Typed DataSets thing of VS that should have never existed on this planet), as well as a lot of really small applications for simple tasks for which setting up a large ORM is an overkill.
And I can say I really like Dapper too actually, because it's so simple. And I think for small applications it's the most easy thing to use. Unless you really have a problem with writing a bit of actual SQL code. But I think the C# Raw string syntax made that a lot better these days too.
Not just healthcare and gov jobs. C# is used in manufacturing and automation industry… which is an easier job to get than getting into Netflix
FINALLY. Thank you for giving some love to C#! ❤
I develop in C# almost since it was born 20 years ago. It's good to note something though, at a regular base I watch Nick's videos these days. The statistics shown here where from 2021. With the new improvements in dotnet version 8 which they made everything has totally changed when it comes to performance. Nick has also posted a video how the DotNet frameworks are so much faster than Everything Else. Maybe that statistics source has some problems like you say, but it might still be worth to at least know about.
They have done a ton of low level performance improvements in the last two years. It's also good to notice that in general there are more options in dotnet for this than in Java, because of the concept of Value Types, which are not allocated on the heap and no subject to the garbage collector.
I know Java has started to implement similar concepts as well, but it's as far as I know not as deeply implementend in everything as in dotnet. This is a major difference.
One thing i really love in C# are the Properties and synthetic fields and also LINQ is just great
Yes, LINQ is baller. In a past company we wrote everything in C#, we were a giant logistics company. Our Web projects to the back end roboter routing services were all in C#. And they did run on linux docker containers. So these days I'm less dogmatic and just say pick your poison.
I still prefer to write Security or performance critical code in C++ :).
LINQ is wonderful. It’s such a natural way to solve problems.
what I find incredible is how the language is severely underrepresented by the tech influencer community
If you like LINQ you should learn haskell :)
@@Dan_1348 Haha :D. I like fast code too and learned a bit of x86 assembly. But it still is a pain in the ass and don't wanna touch it^^.
Developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, developers, ...
I've got four words for you: I love this company!!!!
Nick Chapsas is the fucking man if you are interested in C#. Ignore his accent, the dude is super knowledgeable and amazing at explaining shit.
I do a good amount of F# development these days. I do it on arch Linux in neovim and everything works pretty well. It's basically a slightly more pragmatic ocaml with a much larger ecosystem attached to it and MUCH better documentation. The documentation (or lack there of) and the module system are what turned me away from using Ocaml for real projects.
@yccmbine1053 isn't ocaml's module system highly praised? I'm confused
@@sachindraragul1094 I'm sure some people have. I hated it. The way you end up having tons of dune files spread all around your project. Plus what basically amounts to header files for access restriction.
Fsharp just feels more modern me. You defined namespaces and modules in your files and they're just available to import in other files. It's not a perfect system either, but it makes a lot more sense in my mind at least.
@@ycombine1053 I've just started learning Ocaml and started liking it being a js dev. I guess I too would feel the same on larger projects.
@@sachindraragul1094 for sure, the language is excellent and it's definitely worth learning. I just found myself really annoyed with the lack of documentation for even the more popular libraries and a lot of the tooling was just a little difficult to understand. I'm sure I would get used to it after a while. But there was just too much friction there for me. Especially when I knew I could switch over to fsharp and write VERY similar code with a better ecosystem and docs. Plus the community is really friendly. After you feel comfortable with ocaml, give fsharp a try and let me know how you like it.
I was making a game in Unity as a hobbie. Then in september, because of the Unity fiasco, I switched to using Monogame.
Have to say, working with C# and Monogame is a really good way for me to put into practice what I have learned about Design Patterns an OOP.
Back when I was developing with Unity, it felt as I wasn't really programming with C#, just writing snippets and scripts that would be linked through the Unity UI.
Yeah, MonoGame is great. I have needed to use OpenAI to assist me on the architecture building aspect, though.
Comparison between Monogame and Unity in your opinion?(and Godot if you've taken a look at it)
I was debating trying out Unreal even, but learning c++ for just a hobby piece seems like alot of work for not alot of benefit
That is kind of the point of a game engine like Unity. You aren't coding everything, you are just writing behavioral scripts, and Unity handles the hard stuff behind the scenes.
@@evancombs5159 And by "hard stuff" you mean boilerplate, and ridiculous one at that. Unity's Entity Component System is atrocious and an offense to all programmers.
Ayyy, more MonoGame people! 🤘
C# meta programming is pretty good. Reflection, code compilation, etc. My main complaint about C# is that its got too many ways to do the same thing: and its getting worse with "features" such as primary constructors
These are facts. What further frustrates this situation is that C# devs seem to be some of the *most* difficult to convince to update their skill set, so then you have new language features that are meant to help improve how we work with it and it's only partially adopted so you feel like you're in a polyglot codebase when you're looking at a single language 😔
Primary constructors are stupid, but things like (advanced) pattern matching and switch expressions are great
@@BeatsByYari the only reason C#s patter matching is not as good as rust is because void is not a type 😢.
It suffers the same "death by a thousand features" c++ is experiencing. What I like about java is that they are very cautious about this. They put every suggested feature on the scale of usefulness and added complexity. And many on the first look great features die on that scale. Also many features ruled out by the scale find themselves being picked up again once a better way is found to integrate them better. For example string interpolation was rejected many times. Now that the idea of String template processor was accepted interpolation is implemented using this feature with the reasons for rejection solved by this choice.
It's pretty good when compared with languages that have shitty metaprogramming. But it's not good.
Been binging your vids as I recently found your channel (self-taught programmer who started with c#) and hearing you talk about pattern matching like that was wild. It's kind of just a normal thing for me at this point. I can totally agree though, even knowing how to use it and when to use it, I feel like a wizard every time. lol
Using C# and Godot (did port my project from unity) for past three months, been a really smooth and nice journey. I'm thinking to try blazor which is probably a better way to do frontend instead of React.
A similar story here. The thing with C# is that it's really easy to get into it. I've been working on a plugin for Godot and it only took me around 4 days to port it from GDScript with no prior experience. Truly, it's the superior Java.
Blazor itself works just find but I'd advise to go with Svelte if you just want to not be a React Andy, or HTMX. Finding a UI library for Blazor is hard (unless you Bootstrap)
@@phamlong4210 I'm used to do frontend with TS and React (+tailwind). Since blazor use html. I will give it a try to use it with tailwind.
@@phamlong4210 I've been liking MudBlazor for UI on Blazor
@@phamlong4210 MudBlazor? Radzen, Blazorise, And Design Blazor, SyncFusion. How many do you need? - I prefer MudBlazor as it's free and performs the best.
I see a lot of comments about C# but not enough comments about how awesome the editing is in this video. That outro... *chef''s kiss*
I switched to Linux a time ago, im still still pretty much a Microsoft guy and still program in C# because of work, it works great on both Linux and Mac. BTW if you need SQL Server you can fire up a Linux based container so except for desktop (Windows) apps, you can do pretty much anything with C# outside of Windows
12:10 A use case I see for this (sealed permits) is to emulate a union type, for example a Result which I only want to be derived either as a Success or a Failure but I agree it feels like a weird inverted way to program to specify who can inherit a class at declaration.
Only a sealed type hierarchy makes pattern matching safe and usable for algebraic data types. A Maybe can only be a Some(foo) or a None. A Tree can only be a Node(left,right), a Leaf(val) or Empty etc.
best thing about C# is employability.
totally depends on location
@@rafae5902yes, if you are located on Earth, then you are highly employable. Anywhere else? I wouldn't know.
@@AlgoristHQ LMAO so true
C# is heavily used in Game Development across many companies, including internal game engines, from CI/CD to build, project generation, 3D/asset editor, and "scripting."
C# is also used with microcontroller/embedded/iot
Its wild that C# is at rhe cutting edge of a lot of language features and still has unmatched async (better than js by far). Other langiages are borrowing from it now
As someone who came out of college not that long ago and took multiple semesters of Java and C#, my takeaway feel and knowledge was that C# was a superior Java. A large part of that is the environment and integration. I'm too removed from Java to comment on it, but the future of C# and .NET is really bright. Full stack Blazor that can utilize web assembly and server-side signal R in the same application is going to be seriously powerful. AOT compiling directly into native code like Go and C++ is awesome as well.
Entity Framework is a built-in ORM.
And one of if not the best one out there IMO
@@Slashx92 it's the best!
This also highly depends on what country you work in. In the Netherlands it's mostly C# for most dev jobs. Including the "fun" sectors. Including for giant global companies. Not that you do not see a huge amount of jobs for other langs.
Most of what "people" write in C# is onion code. As you peel back the layers you cry more.
Like FizzBizz enterprise edition? But C# instead of Java?
What do you mean? Controller, Service, Entity?
I'd pick C# or F# over Java any day.
I have been using C# in enterprise environment on Linux servers something like 15 years already. During Mono time there was occasional hiccups, but nothing major hit our apps. Since dotnet core was released years ago it has been smooth sailing and I couldn't be happier.
Except maybe we should rewrite our things with Rust =D
StackOverflow is implemented in C#
20:12 About net implemented span zero alloc system.
thats why after net5 , it gains better performance
, if you code with 0alloc approach ( span )
I started with C# and because I have my fancy looking VS Code, the effort to compile C# Blazor made me look at other languages and fall in love with golang. OMG, this is like how my brain expected C# to work and then forced into all this OOP stuff “Just Because” or “Standard way of doing stuff”. Anyways I went into Golang thinking better php and got my mind blown by finding out it didn’t need a runtime environment. Structs is how I always wanted to use Classes. It just felt so so so much more natural to code in.
my take is, C# evolved to be what Java should've been, also 18:40 the graph is purely for most loved frameworks to work with, so its doesnt relly matter what they do as long as people like them.
C# is my main language but I can see how some one just getting started could be confused.
A top level program looks like magic lmaooo if you don’t understand it.
I was a programmer for 25 years and retired. I watch this channel because at this point it's so interesting to see the same discussions/problems on repeat. AND, I LOVE the jargon. It's how I know I'm already outdated. Ass pennies, hilarious. :)
Same situation but 37+ years. I only code on hobby basis these days. Yeah, and I watch this channel for the same reasons and have come to the same conclusions. ;)
Modern C# is a good language, with probably one of my favorite syntax and standard library. But with some historical baggage, bad crossplatform UI options and god awful tooling in MsBuild.
I don't know about the bad cross platform UI options (I develop mostly for Web and background workers), but the tooling is so much better since .NET Core came out.
Nowadays I develop mostly on NeoVim+tmux running on WSL2. I still go to VS Code when I need decent debugging, but apart from it, dotnet CLI works just fine.
well Avalonia works on Linux, but it's XAML soooooooooo yeah
One note about sealed classes (and interfaces, this is available for interfaces too) in Java.
Essentially, they're a (rather clumsy) roundabout way of achieving tagged unions in Java (like enums in Rust), which can be useful for exhaustive pattern matching.
Basically, you might see code like
"sealed interface SomeUnion permits VariantA, VariantB {}"
and then if you do a switch on an instance of SomeUnion, assuming non-null (god i hate java and all it's old baggage), you'll be guaranteed to have an exhaustive match as long as you match against VariantA and VariantB
ITO cross-platform stuff, well, I run my .NET Core APIs on Alpine Linux containers in prod. We handle like $2bn worth of transactions a year. So, it's definitely production-ready cross-platform.
C# is a gem, along with Scala OOP languages don't get any better.
"If you're going to Quora to find answers to things, you've already messed up." 😂 True
C# is amazing, I absolutely love working with it
I got to take part in an F# project at work. It was great. The only major thing that's missing is type classes or something similar (and maybe algebraic effects). Anyway, if I got to choose the tech stack for some corporatey service/backend I'd go with F#.
People still think C# is Windows-only; in the era of Internet and abundance of information. Unbelievable.
Funniest part is, most of them likely have at least one game written in C# on their phone
@@SwampKryakwa 1? in 2022 around 50% of all mobile games / applications were built in Unity, thus C#.
@@Cadaverine1990 "at least"
C# can run about anywhere but at it's core its still Windows programming. You are required to have the .NetFrameWork on you pc to run it. For now, the terms seem acceptable but Microsoft has a tendency to not respect user choice. Microsoft holds C# back as its creator. C# is better than Java, but I am still rooting for Java to make a come back.
@SwampKryakwa😂
Hell has frozen. Prime talking about C#. Btw I love C#, I would love to see more C#.
No language is sufficiently bad to be rejected and no language is so good that it can be universally accepted.
I've gotten job offers where they pay a premium specifically because I have experience with both C# and Java (building enterprise apps and APIs). Recruiters have told me it's hard to find someone that can (or will) work with both, which is strange to me considering how similar the two languages are.
I do C# primarily and have for several years now, and honestly I love it. It's my favorite language and has been for a while. Sure, it's not for the people who need absolute balls-to-the-wall performance and can't handle GC pauses. But for a lot of use-cases with webservices, background services, docker containers, etc, it really is pretty great. If you need one of those "Java-like" languages for your project, I would recommend C# above other similar options.
Been coding C# for years.
(Swapped from Java in 2014)
And I was always curious as to why your take on C# is bad was there.
I'm glad it was more a casual ribbing than an actual bad language.
Cause I genuinely enjoy it more than any other language I've used.
My only complaint is usually that there's just usually more code to do a thing that other languages.
Boilerplate is heavy.
But the code looks good, makes sense, and it clicks for me.
With the side bonus of Godot, Unity, Maui/Xamarin also working with pretty much the exact same ruleset and standards.
Means I can do those as side projects and gain mastery for my actual job at the same time.
Tried a JS job. And in comparison I just wanted to tear my hair out. Although could have been the company. But the styles are so different is it a tough thing to swap between.
I've written code in both C# and Java. In my opinion, C# is easier to write and understand and it's extremely useful when you want to dig deep into Windows (of course by utilizing Win32 API). Java on the other hand runs on JVM and has little capabilities to work with the OS kernel. And you have little room for errors in C#, most of the errors are detected right in compile time.
LINQ existed long before Java introduced its Stream API. CompletableFuture is some hard-to-use C# Task imitation.
Using Java you write more to do less. You have to write a lot of boilerplate code to do the same thing.
When you work with Java for a while you must know how to optimize the JVM options or your app will run out of heap memory sometime.
The guy totally misrepresented the Quora post at 5:08. The post was saying "this is how things were in the past" but if you read down, it literally says that things are better now with mono and xamarin. But this guy makes a point of mentioning that this post was written in 2017 without mentioning that they are talking about the past in the first part of the post. Learn how to read.
C# is a great language with many support, It one of my favorite programming languages to this day, with c# LINQ expressions being a big plus, I try java, python, c and c++ but still love c#
Pattern matching is great when a language has algebraic data types (like Rust enums). In the absence of that its rather disappointing.
I’ve worked at my fair share of “enterprise” companies, and yes, the C# finance/government, stereotype is true. At the company I currently work, we’re .Net containers in alpine. If you asked me that just 3 years ago I would’ve drop kicked you. It’s staggering how quickly MS is improving .Net. I mean, the new features in .Net 8 are just insane, it’s like an entirely different platform. The fact that I’m coding, building, testing all on Linux with minimal configuration still boggles my mind. That said I still prefer Go, something about it reminds me of C, makes me feel like I’m in full control with minimal baggage.
Man, editor did him dirty 0:14
21:30 I agree. the C# JIT compiler is very good at identifying and optimizing repetitive tasks, so pretty much *any* benchmark is inherently flawed.
Unless your web server always returns the same result for the same input (there's no per-user personalization), your performance won't be as good as the benchmark.
C# is still my favorite language though, but a good point is a good point.
It is pretty comparable to the benchmarks actually, because in all codes there are places that can be optimized this way (and variable input does not make the JIT unable to optimize things with like inlining and simd for example).
@@diadetediotedio6918 Benchmarks can be optimized for a simple case because the stand-out case is vastly more frequent than in any real-life situation, if not the sole one, so not really. At most, it shows you the best scenario.
I know people who started with Java and ended up C# and say they would never go back.
I stated with C# 1.0 2002, and it is still the best all round language you can find so 22 years of none stop experience in that case :-).
It is brilliant when you need to refactor anything.
С# supports pointers and unmanaged memory allocation (e.g. stackalloc). Very usefull for Interop or if you want some crazy optimization.
@DavesGarage did a "drag race" with computer languages that was pretty cool
Loads of Java in the Cyber Security space. Knowing that a CVE is going to be fixed if you have paid support is very important. Before using C#, check what patents Microsoft asserts for which components. We have been burned before. I'm very wary now.
12:10 sealed hierarchies are extremely versatile feature. There are tons of things that can be done with the guarantee, that no type outside your library can extend or implement a type. For example you can make finite algebraic types with it.
For example the option type:
public sealed interface Option {
record None() implements Option {}
record Some(T value) implements Option {}
}
This might be more clunky then a rust enum but it has the same user side semantics. (pattern matching)
(Btw you can drop the permits if all subtypes are declared in the same file.)
My two favourite coding channels together in one video?
From a person who wrote java before c#. C# was kinda of a revelation. I never though java could be that easy. IDK c# is still really good and works really nice on anything
C# LETTTTSSGOOOOOOO!
Abstract sealed classes as added to Java, allow for exhaustiveness checks in pattern matching. With open inheritance, no guarantees can be given by the compiler that the provided cases cover all possibilities. By explicitly enumerating all classes that inherit from the sealed class, the compiler will be able to to do that check. It allows for usages that in functional languages are served by ADTs (algebraic data types). Sometimes all types are known in advance, like for example Some and None in an Option or Maybe type.
Using inheritance to try to code features available in ADTs is an abomination though, even if it allows exhaustiveness checking. Just add ADTs to the language and be done.
Oh ffs just limit inheritence to classes in same package/assembly whatever so they get into one compiled unit. There you go, guarantees. Java people just need to do everything with their asses
It's weird seeing so many comments express doubt about C# being cross-platform. I don't know how to make this any clearer: at home, I code in C# entirely in Linux and frequently deploy to Raspberry Pi. At work, almost everyone uses a Mac. I've worked in all three major clouds, and we always just deploy using Docker and Alpine Linux.
@danielhalachev4714
The language on itself is cross-platform, people are blaming the language because of bad framework support are crazy
@danielhalachev4714 "The point is likely that most C# applications are GUIs"
citation needed, lol
I've been a career C# dev for 15 years. I've met many devs who went from Java -> C# and never went back. I've met many devs who went from C# -> Java on the odd project and vowed never again. The general comment was, it was like flying coach after having experienced first class. So many awesome language features missing. If you're worried about perf, I agree, write C++.
C# over Java any time. I haven't used Java since I learned C#.
But the worst that ever happened to me was being made to use Matlab.
The fact that you kept the discord notification in the vid is hilarious 2:18
C#'s Task library is far superior to anything in Java, JavaScript, Python, etc. Up until Go (I think), C# was probably the only language with easy-to-use dynamic hardware thread use, where it will scale the number of hardware threads automatically, based on a hill climbing algorithm, to suit your Task load.
Java has Go-like threads called Virtual Threads.
Doing C# fulltime now and absolutely love it. Even WPF grew on me.
Learned Java initially, but since the fustercluck after 9, I wouldn't even know where to start.
Used C# recently after not touching it for about 5 years and was pleased
hypothesis that open AI is being trained on quora data gave me a fine laugh
thnak you
C# is hands down the most versatile language regarding real usage. Languages are just tools, and most languages can "do anything," but you will be hard-pressed to find a language that is as widely used as C# in the enterprise, gaming, mobile, web, embedded, machine learning, etc.
For beginners, it's a great first language because of that versatility, type system, tools, ease of learning, etc.
I agree, but, nitpick from me here, it's good to mention that there is something that C# quite obviously cannot, and that is being a real systems programming language.
I do not see how it can be used to write an operating system or low level drivers, considering how it depends on a garbage collector and pretty high level library code as well.
Even the new AOT way of compiling does not really solve that.
I agree, you gotta learn some more boilerplate than a few other beginner languages though, particularly Python.
@@jongeduard Yeah but nothing really is going to be as good as C or C++, or Assembly for that matter for system's programming.
@@astrahcat1212 Well, Rust is that language in my opinion.
As of 2023, if you only know C#, C/C++ and got some knowledge of Html/css, you can build almost anything software related(desktop apps, web apps, mobile apps, serverside apps, database management systems, entreprise grade solutions, ...) and so much more it is ridiculous.
I hate all the languages I used back in college. Because I sucked back then and didn't have good time using them. I've recently switched to C# from Java and it's my favorite language rn, because I know what I'm doing and there are a bunch of QoL improvements over Java.
C# has made dificult stuff trivial for me, I can't feel any hate towards it, I really like it.
C# is so much more than Java. It now has AOT in pre-release, where you can compile your code directly as an executable (no IL). It's essentially like GO.
It still has some issues, but it will be great once it's released.
I've used both. C# is far more pleasant all-around. The syntax in nicer. The package manager is nicer. The build process is easier. There are innovative frameworks like Blazor. I've never hit a compiler bug. It's performant enough to be used widely in the consumer and professional trading world. And it interops seamlessly with F#, an underrated ML language.
C# isn't cool. It isn't pathbreaking. It just gets the job done with minimal fuss.
I've tried both Java and C# for 1 year
I stand with his tweet
Cant speak for anyone else but i have really enjoyed using C#. Picking it up from scratch was a bit tricky as it as a LOT of language level features and syntax. And coming from python, a more strict typed environment led to a lot of learning. But Visual Studio for how bulky it is, works. I have never felt more empowered and it allowed me to make a medium sized mod for a Unity game i really enjoyed in honestly a pretty short amount of time.
I really liked that the IDE has so many options for side functionality, like decompiling binaries so you can find hooks instead of having to go search for source documentation.
Doing that text editor from scratch challenge btw. Very hard and interesting.
He finally said it, C# is great.
I will always have a soft spot in my heart for C#.. Mono was one of the first open source projects I ever contributed to. (I'm so old, that I had to *fax* a notarized document assigning the copyright of my C# standard library code over to Novell in order to contribute)