dotnext DotNext 2020 Msc (02.12.2020 — 05.12.2020)

Source Generators in action

img

In this talk, you will learn not only what is hidden behind the "Source Generators" term and how to use it, but also how to provide the user of your generator with the necessary configuration flexibility and clear messages about emerging problems.

C#9 will bring us the long-awaited compiler integrated code generation capability. If you’ve dreamed of getting rid of thousands of lines of code or have always wanted to try metaprogramming, now it’s easier than ever!

In this talk, you will learn not only what is hidden behind the "Source Generators" term and how to use it, but also how to provide the user of your generator with the necessary configuration flexibility and clear messages about emerging problems.

Code generation is considered an area where it’s difficult to understand what went wrong, to cover a program with tests, or to look at the resulting code under a debugger. This keeps many programmers from using it and in this talk, Andrey will talk about how generators cope with this.

People who have been using existing metaprogramming technologies in practice for a long time will be interested in what scenarios were not supported in C#9 and in comparing new features with existing technologies (Fody, PostSharp, T4, etc.). Do they still have unique niches and advantages or is the future with generators?