News for hackers. Stuff that matters.
Re:Say “no” to import side‐effects in Python by mercurial on Saturday April 05, 2014 @09:36AM (#7537029)
It's like programmers who find out about metaprogramming. Usually they grow out of it.
Re:Say “no” to import side‐effects in Python by atilaneves on Saturday April 05, 2014 @10:04AM (#7537097)
I haven't grown out of metaprogramming at all. I just try and use it only when it's the best option. Usually because it means reducing duplication.

I liked metaprogramming to an extent in C++. I _love_ it in D.

Re:Say “no” to import side‐effects in Python by gbog on Saturday April 05, 2014 @11:16AM (#7537286)
Replace "best option" with "only practical option" and you're good to go.
Re:Say “no” to import side‐effects in Python by einhverfr on Saturday April 05, 2014 @09:57PM (#7539346)
That may depend on the language you are using.
Re:Say “no” to import side‐effects in Python by einhverfr on Saturday April 05, 2014 @12:45PM (#7537556)
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).
Re:Say “no” to import side‐effects in Python by mercurial on Sunday April 06, 2014 @02:10PM (#7541864)
I'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?