3 ms·
I've found that static metaprogramming produces an odd middle-ground. The intermediate code can be wonderfully legible and this lets you quickly find bugs... b
by Pxtl 13y ago
I've found that static metaprogramming produces an odd middle-ground. The intermediate code can be wonderfully legible and this lets you quickly find bugs... but when it comes time to fix the bug you have to go into the original generating code and then you find an absolute horror.
In this case I'm referring to C# T4.
- swift 13y agoVisual Studio doesn't exactly treat T4 as a first-class language, which is a shame. Debugging it is much harder than it should be. I've found that it's frankly easier just to write your code generation in C# itself as an extra build phase.
- jaegerpicker 13y agoI wish I could vote this up many many times. Code first EF for c# is much nicer IMO.
- Peaker 13y agoOTOH, bugs in auto-generated code are much less common.