Rosyln vs. T4 for code generation

So, I have a lot of knowledge invested in T4. I wrote several code generators of varying complexity and, as a rule, I love it with the caution of code-generating code, which is difficult for unit test (but I even worked on it a little). Now, though, I have heard more and more about the Rosyln project. I heard a lot of things that he supposedly does. Syntax analysis, use as a scripting language, etc., as well as some code generation (although I think this happens at runtime, not at compile time)

How do these two very different technologies add up? Also, today T4 is stable, what should normally be the β€œdefault” for code generators?

In what ways do they differ, and what are the pros and cons with any method?

+7
source share

All Articles