Forum Discussion
Eduard Keilholz
Nov 03, 2021Copper Contributor
C# 10
What's your favorite addition to C# in version 10?
27 Replies
- AnthCoolCopper ContributorExtended property patterns are neat. Always great to have more ways to write something.
- JamesMontemagno
Microsoft
I am a fan of global usings! Paired with implicit usings and scopped namespaces my files are so minimal and clean!- VaclavEliasCopper ContributorSame here!
- pkanavosCopper ContributorNew pattern matching and lambda magic. I often create pipelines with DataFlow or Channels. To make such code read more like a script, eg `FromSource.Map(MappingFunction).Lookup(....).WriteToSql(...);` I created some extension methods too hide the boilerplate code for generating blocks/channels, connecting them to the pipeline and handling errors. I tried to use a railway-oriented programming style as much as possible. Unfortunately, I had to do quite a lot of explicit casting to `Func<...>` which made the extension methods a lot harder to write and use than I liked. The one feature I still miss is discriminated unions and the corresponding pattern matching. That would make railway-oriented Result handling a lot cleaner and easier
- _SergVasiliev_Copper Contributor
Constant interpolated strings 🙂