5 ms·
In Perl, I find metaprogramming to be extremely powerful. I don't go too deep into Class::MOP usually. However, I do find that focusing on tooling before code
by einhverfr 13y ago
In Perl, I find metaprogramming to be extremely powerful. I don't go too deep into Class::MOP usually. However, I do find that focusing on tooling before code is usually a net win. This means a lot of work can be done by writing DSL's that use metaprogramming behind the scenes. It works well and has become a common approach for certain kind of things (like object frameworks).
- mercurial 13y agoI'm not saying you should never use metaprogramming. Sometimes there is no other (practical) way. But it can be easily abused, often for a little added convenience but a much larger conceptual complexity and additional debugging issues. Why have a well-designed API when you can have a metaprogrammmed mess instead?