C# source generators are...just macros?

They are not. They are generators. Macros tends to be local and explicit as the other commenters have said. They are more like templates. Generators can be fairly involved and feels like a mini language, one that is not as observable as macros.

Isn't this just a string template? https://github.com/CharlieDigital/SKPromptGenerator/blob/mai...

Maybe you're confusing `System.Reflection.Emit` and source generators? Source generators are just a source tree walker + string templates to write source files.

> Generators can be fairly involved and feels like a mini language, one that is not as observable as macros.

I agree the syntax is awkward, but all it boils down to is concatenating code in strings and adding it as a file to your codebase.

And the syntax will 100% get cleaner (it;s already happening with stuff like ForAttributeWithMetadataName