3 ms·
Conceptually, I think this makes sense. People already bend Python into horrendous DSL-esque abominations using the flexibility already afforded. Macros might a
by kortex 6y ago
Conceptually, I think this makes sense. People already bend Python into horrendous DSL-esque abominations using the flexibility already afforded. Macros might allow for these contortions to be more principled and vettable.
OTOH, I am not keen on this opening the door to even more stuff newbies have to learn, especially in the ML domain, where you just know people will use macros to do all manner of "clever tricks".
This proposal also seems too limited to truly enable the kind of performance speedups numerical Pythonistas really want.
The ! notation feels icky and "un-python" to me. Maybe that's just (lack of) mere exposure effect.
What I want instead: improve/stabilize tools and CPython hooks for decompiling, code generation, AST manipulation, and the like. When I can go source -> AST -> source with confidence, maybe lets revisit macros.