Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Visual 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.


I wish I could vote this up many many times. Code first EF for c# is much nicer IMO.


OTOH, bugs in auto-generated code are much less common.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: