Destruct1 wrote:DSL are important and arithmetic operations are not special. However it is possible to implement this kind of
behavior in Python (and other languages) with operator overloading.
Unfortunately, operator overloading gives you a limited vocabulary (search the Boost devel list for several debates over operator connotation, or justifying an unusual choice due to precedence rules). Furthermore, operator overloading and other function-based approaches cannot perform code refactoring that requires changing evaluation rules, introducing variables, etc. (unless you're wielding monads in an ML variant). C++ has made great strides using templates for metaprogramming; but I dare you to say templates are easier to comprehend than macros.

The Boost Preprocessor library would not be necessary if templates were as powerful as macros.