|
|
|
|
|
by gbog
4791 days ago
|
|
> it saves some typing Your macropy is very interesting, but please do not use this argument. "Saving some typing" is the least interesting side-effect of some macros. To clarify my point: in most of the industry, we all fight hard to garden big codebases with intricate dependency problems. I am convinced that code complexity management is very far from a solved problem, and I hope advanced tools like macros can help there. But "saving a few keystrokes" is very often at the heart of the stupides issues we have with code complexity. Two examples: + "from x import " <-- this saves a few typing, but it become extremely annoying as soon as your code get more than 10 modules. + template.render(tpl_file, locals()) <-- this feeds the template space with shit and makes it much harder to trace data between templates and models. I daily revile the guy who typed the "*locals()" in the Mako doc. |
|