Re: I dont get Macros
Posted: Tue Feb 16, 2010 9:19 am
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.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.
