Hacker News new | past | comments | ask | show | jobs | submit login

Metaprogramming frequently reduces readability of the code. Almost all Linux kernel developers and embedded systems programmers are familiar with the linked list composed only of #define 's, and other metaprogramming solutions. It doesn't mean that seeing things like that are readable or easily traced to reproduce what happened.

Maybe you are so smart you can juggle it all in your head, as Torvalds is reputed to do with the Linux kernel. The rest of us don't have the ability to hold the mental model of both the primary layer and the metaprogrammed layer in our heads without a devotion of time that would exceed our schedules.

Thankfully in C-like languages, the compilers I've worked with will let you see the post-metaprogrammed output.

C++ templates and other metaprogramming features improve readability; I'm don't mean to cast shade on metaprogramming in general, just heavily obfuscated implementations.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: