Partial classes are great for code generation. A way to add on functionality where you don't want to put code in a .cs file that might get clobbered / regenerated (think EF Scaffolding, POCOs, TT4, etc.). Most those classes generated in that paradigm are created as partial for exactly that reason. :)
@@ubudubu100 That, I haven't figured out yet. It looks (and feels) really wonky. It's almost like abstract methods in abstract classes or even interface methods, but why partial? This was the first I had even seen that syntax. Solution looking for a problem, maybe?
Partial properties could also be for code generation for overriding properties, rather than just adding properties? You're also tied to partial classes if you use partial properties...
[ ] for collections initialisers or empty collections was such a huge addition for me (think it was c#12), so much less clutter and de-noising of your code. Wish they had done it ages ago. Btw, what platforms will your podcast be available on?
So far I have found collection initialisers pretty bad at infering the type. Occasionally I get an analyser moan at me to change to collection initialiser syntax but when l actually want to use it then usually it tells me that it can't work out what type to use, making it a bit inconsistent and underwhelming.
At some time I'd like to learn C# / .NET What books and/or courses would you recommend Ed? Thusfar very happy with PowerShell (built on .NET), which is great for creating/wrapping commandline tools... My main focus is automation/web-scraping/AI/RestAPIs.
I think the argument for MAUI is code reuse and productivity over maximum performance, native look and feel. If your app is for internal use or you have limited developer resources then MAUI and Blazor hybrid can make a lot of sense. This can be especially true for MVP.
@@edandersen Tis true. I don't know about you but I've always disliked the "params" keyword. Feels unnatural to me. But I agree with your overall sentiment that it appears they're really scraping the bottom of the barrel for new language features.
@@keyser456 not sure why they don't just make typescript run on the CLR. That was the point of the CLR, multiple language support. Not to turn C# into every single language all at once
@edandersen I could not agree more. They switched to this blisteringly fast release schedule and within just a few releases the language was almost unrecognizable. So many syntaxes to accomplish the same thing. You can't learn just one since who knows what your fellow devs will use.
@@edandersentypescript is not meant to be run on CLR, it's a type checker for JavaScript, so it's supposed to be run where JavaScript is run, and that includes web browsers. and c sharp cannot be run in web browsers.
I agree with most of it, but learning another language means also learning tools and APIs which is time consuming. It's still may be worth it, but for a single developer?
I think at this point you shouldn't pigeonhole yourself too much. LLMs let you be a lot more flexible if you have the core skills. Thanks for the comment!
@@edandersen I generally agree with you. It's time to prepare. But after peaking at 15 languages and GitCoPilot, I can't say LLM can help me be productive just yet in other than in my core area like C#/Javascript. I am banking on more languages like J2 in 10 years.
Lmao thats a good comment , i really hate that about C#, where is the simplicity and conciseness ? This also make it harder for beginners to get into it. @@yourcrazybear
@@emptycode1782 What happened to the fact that the time spent coding is much less than time spent thinking? But still they add "features" to save us a few seconds of typing! Fucking lame! But the cost is a much more complex language!
What I really hate about. Net way is that it adds unnecessary stuff for ease, then adds more on top of it to make the new feature even more simpler.. and before you know it we have introduced 12 new syntaxes just to save a bit of typing. Example, set/getField() was too much so props were added (this could'vebeen done by autogen code), properties definition syntax added its own nuances over the period of time and now we have soooo much syntax to remember just to save typing get or set. In Java people don't have issue typing same getter and setter, right?
I don't love typing code anymore, sometime my old injured hands just can't. So I'm prompting maybe soon training llms to generate code. dealing with the parenthesis and brackets as the language befcomes more fuctional. With Linq and spans being performant. It's not saving time at all at this point but at some point it will nature so as to be able to maintain code. focusing on a llm code generator prompts, say to use design patterns like collections not having a setter, using lazy load on getter's, to generate code in this style or other or to do these very repetitive chores . I'm hopefing to invest in tooling goal being not having to type , and The intellectual property should just be the English description, in the empedded comments and Attitubutes and tags. And the scripts thant might extract that metadata, and a general plus application core prompt. The best about C# is you can just usually update and build and it's much faster, and keep the old systax or use non AI tools to batch update syntactic sugar and commit it as one pass. the abstract algebra and fixed point math for the snapdragon was added on .net 9. That's can really make a system use much let heat and battery, before it just didtn matter. I can only hope Microsoft commits to this low power chip for portables, it changes the artchiture for alot of problems away from GPU to CPU simd and cache friendly. Intrinsics are abstracted so hopefully it will run on anything but we still have to keep in mind what size buffers to use and such.
C# is amazing. Back in the days I resisted it and wanted nothing to do with it. I changed my attitude towards it after it started warming up to the OS platforms that I develop software applications in. I have in recent times developed C# applications for Windows, Web and Android in .NET MAUI. I hope one day I will be able to developed C# applications for Linux too.
Underwhelming update because they invested a lot into roles and extensions and they didn't make it into this year's update, so we were left with the rest of the features that were pushed. Some were just put to make up for the uncertainty of pushing extensions in this version, like the backwards indexing and the \e escape sequence. For primary constructors I think the biggest issue is that we still have not figured out what goes into a constructor and what does not. So the team invested and provided the bare minimum that nobody would disagree with, simplifying down the copy-pasted mapping code, in combination with field initializers. For my pov, constructors should be the dumbest possible pieces of code that simply assign values into fields, and initialize other fields to prepare the object for usage. Others prefer their constructors doing domain validation, which I completely disagree with. Once we sort this out and fixate into one use case for constructors, then will the team decide how to expand primary constructors.
@@edandersen They'll never do that, it's just too limiting. Having the ability to specify pre-, post conditions and invariant (a la microsoft contract) would be great though.
I don't see primary constructors as a design failure; for me, it's merely incomplete. Kotlin is an amazing language and offers a more comprehensive approach (with init blocks, member initialization as parameters, etc.). This is just my humble opinion.
@ well, that’s a valid opinion, assuming you have some faith in the team. So let me be more specific: p.c. in the current iteration, are dengerous. I used them a couple of times while writing new code, just to discover I needed more initialization later. Fixing the code took some precious time. At least, records have a very specific use case and they are harder to misuse.
Who got "Who's that MVP?" right? 😊
Also, this can't be a podcast because the audio quality is so bad. So there. (use the subtitles / CC)
just use an audio preset in your video editor to apply some subtractive eq on the lowend and a bit of compression.
what does that even mean lol
@@edandersen what software you use for your video editing?
The song in the beginning had me laughing like a crazy person! Awesome content. I see (or hear) nothing wrong with the audio!
@@luckyknot A mixture of OBS and Davinci Resolve
Partial classes are great for code generation. A way to add on functionality where you don't want to put code in a .cs file that might get clobbered / regenerated (think EF Scaffolding, POCOs, TT4, etc.). Most those classes generated in that paradigm are created as partial for exactly that reason. :)
Very true! Thanks for the comment!
Ok, partial classes are useful, I agree. But what is the usage of partial properties or methods?
@@ubudubu100 That, I haven't figured out yet. It looks (and feels) really wonky. It's almost like abstract methods in abstract classes or even interface methods, but why partial? This was the first I had even seen that syntax. Solution looking for a problem, maybe?
@@keyser456 more like "someone's performance review is coming up and they need to shoehorn something in"
Partial properties could also be for code generation for overriding properties, rather than just adding properties? You're also tied to partial classes if you use partial properties...
allow ref struct is another amazing feature of C# 13 and .NET 9
Nice video as always, but when will C# slow down and give use longer LTS versions q_q 5 year plz
[ ] for collections initialisers or empty collections was such a huge addition for me (think it was c#12), so much less clutter and de-noising of your code. Wish they had done it ages ago. Btw, what platforms will your podcast be available on?
Yeah that was a pretty good one. Thanks for the comment!
So far I have found collection initialisers pretty bad at infering the type. Occasionally I get an analyser moan at me to change to collection initialiser syntax but when l actually want to use it then usually it tells me that it can't work out what type to use, making it a bit inconsistent and underwhelming.
@@georgehelyar hmm, not had that, but I only really use them for simple types.
It really depends on how much you use var in the code. If you strongly type the collections you're going to have a much better time.
List
Appreciate the share!
a question: why win10 and not win11 or linux (Rider)?
Just prefer it as a virtual machine :-) thanks for the comment!
@@edandersen any technical reasons :) ? I miss the win 10 outlook and feel and performance, and I hate win11 however I like its features..
@@user-lk1hg9ev5u taskbar on the top, no TPM requirement for VMs
At some time I'd like to learn C# / .NET What books and/or courses would you recommend Ed?
Thusfar very happy with PowerShell (built on .NET), which is great for creating/wrapping commandline tools... My main focus is automation/web-scraping/AI/RestAPIs.
Hey, check out my "Brutally Honest Advice" video for some book recommendations. thanks for the comment!
The internet is full of documentation and tutorials. You don't need to buy a book for that.
I think the argument for MAUI is code reuse and productivity over maximum performance, native look and feel. If your app is for internal use or you have limited developer resources then MAUI and Blazor hybrid can make a lot of sense. This can be especially true for MVP.
That's fair! the equation is changing though.
Thank you for this video, very informative!
Bit of a side question. If you were going to move to another company, what is the minimum. NET version you'd be happy to consider?
4.8.2 is fine. No Blazor or Razor Pages ;-)
For brevity, why would we not use a collection initializer in C# 12? var subsList = new SubscriberList([ "Barry", "Larry" ]);
This one is even shorter! No square brackets lol
@@edandersen Tis true. I don't know about you but I've always disliked the "params" keyword. Feels unnatural to me. But I agree with your overall sentiment that it appears they're really scraping the bottom of the barrel for new language features.
@@keyser456 not sure why they don't just make typescript run on the CLR. That was the point of the CLR, multiple language support. Not to turn C# into every single language all at once
@edandersen I could not agree more. They switched to this blisteringly fast release schedule and within just a few releases the language was almost unrecognizable. So many syntaxes to accomplish the same thing. You can't learn just one since who knows what your fellow devs will use.
@@edandersentypescript is not meant to be run on CLR, it's a type checker for JavaScript, so it's supposed to be run where JavaScript is run, and that includes web browsers. and c sharp cannot be run in web browsers.
I agree with most of it, but learning another language means also learning tools and APIs which is time consuming. It's still may be worth it, but for a single developer?
I think at this point you shouldn't pigeonhole yourself too much. LLMs let you be a lot more flexible if you have the core skills. Thanks for the comment!
@@edandersen I generally agree with you. It's time to prepare. But after peaking at 15 languages and GitCoPilot, I can't say LLM can help me be productive just yet in other than in my core area like C#/Javascript. I am banking on more languages like J2 in 10 years.
Some day C# will have all features a programming language can have :)
With hundreds of ways to do the same thing? 🤣
@@yourcrazybear we're long past that point. Only C++ is serious rival.
Lmao thats a good comment , i really hate that about C#, where is the simplicity and conciseness ?
This also make it harder for beginners to get into it. @@yourcrazybear
Yeah, it's sad!
@@emptycode1782
What happened to the fact that the time spent coding is much less than time spent thinking? But still they add "features" to save us a few seconds of typing! Fucking lame! But the cost is a much more complex language!
Thanks, the best podcast I have watched for some time! 😃
noooo it's not a podcast!!! (thanks for the comment!)
What I really hate about. Net way is that it adds unnecessary stuff for ease, then adds more on top of it to make the new feature even more simpler.. and before you know it we have introduced 12 new syntaxes just to save a bit of typing. Example, set/getField() was too much so props were added (this could'vebeen done by autogen code), properties definition syntax added its own nuances over the period of time and now we have soooo much syntax to remember just to save typing get or set. In Java people don't have issue typing same getter and setter, right?
I think auto properties are pretty good but yeah, there is a lot of stuff to worry about now. Thanks for the comment!
I don't love typing code anymore, sometime my old injured hands just can't. So I'm prompting maybe soon training llms to generate code. dealing with the parenthesis and brackets as the language befcomes more fuctional. With Linq and spans being performant. It's not saving time at all at this point but at some point it will nature so as to be able to maintain code.
focusing on a llm code generator prompts, say to use design patterns like collections not having a setter, using lazy load on getter's, to generate code in this style or other or to do these very repetitive chores . I'm hopefing to invest in tooling goal being not having to type , and The intellectual property should just be the English description, in the empedded comments and Attitubutes and tags. And the scripts thant might extract that metadata, and a general plus application core prompt.
The best about C# is you can just usually update and build and it's much faster, and keep the old systax or use non AI tools to batch update syntactic sugar and commit it as one pass. the abstract algebra and fixed point math for the snapdragon was added on .net 9. That's can really make a system use much let heat and battery, before it just didtn matter. I can only hope Microsoft commits to this low power chip for portables, it changes the artchiture for alot of problems away from GPU to CPU simd and cache friendly. Intrinsics are abstracted so hopefully it will run on anything but we still have to keep in mind what size buffers to use and such.
C# is amazing. Back in the days I resisted it and wanted nothing to do with it. I changed my attitude towards it after it started warming up to the OS platforms that I develop software applications in. I have in recent times developed C# applications for Windows, Web and Android in .NET MAUI. I hope one day I will be able to developed C# applications for Linux too.
I love C#! thanks for the comment!
Can I work for you? 😂 the true MVP
maui MVVM is full of partial class for community toolkit
Fair
I really would like c# to support union types!
That would be pretty wild! Thanks for the comment :-)
Underwhelming update. A whole year for just this. And C# 12 primary constructors are not only underwhelming, but also a failure as design.
Underwhelming update because they invested a lot into roles and extensions and they didn't make it into this year's update, so we were left with the rest of the features that were pushed. Some were just put to make up for the uncertainty of pushing extensions in this version, like the backwards indexing and the \e escape sequence.
For primary constructors I think the biggest issue is that we still have not figured out what goes into a constructor and what does not. So the team invested and provided the bare minimum that nobody would disagree with, simplifying down the copy-pasted mapping code, in combination with field initializers. For my pov, constructors should be the dumbest possible pieces of code that simply assign values into fields, and initialize other fields to prepare the object for usage. Others prefer their constructors doing domain validation, which I completely disagree with. Once we sort this out and fixate into one use case for constructors, then will the team decide how to expand primary constructors.
C# 14 should fail to compile and constructor with logic in it. variable assignment only. that would be an improvement
@@edandersen They'll never do that, it's just too limiting. Having the ability to specify pre-, post conditions and invariant (a la microsoft contract) would be great though.
I don't see primary constructors as a design failure; for me, it's merely incomplete. Kotlin is an amazing language and offers a more comprehensive approach (with init blocks, member initialization as parameters, etc.). This is just my humble opinion.
@ well, that’s a valid opinion, assuming you have some faith in the team. So let me be more specific: p.c. in the current iteration, are dengerous. I used them a couple of times while writing new code, just to discover I needed more initialization later. Fixing the code took some precious time. At least, records have a very specific use case and they are harder to misuse.
Of course, everything has to be a podcast 🙄
not a podcast cos I say so 😅 thanks for the comment!
You're just showing new features but not explaining it.. that's why i downvoted
thanks for watching anyway!