37 ms·
By the way, I love Python and use it every day, so I'm not trying to get into a language war. The difference between using a decorator and a lisp macro is that
by d0m 11y ago
By the way, I love Python and use it every day, so I'm not trying to get into a language war.
The difference between using a decorator and a lisp macro is that using a decorator is "using the syntax of the language to solve your problem", while a macro is "adding a new syntax".
I do think there are way in Python (or in C++) to use meta-programming to tweak the language but it always feel very hacky. I.e. I'd hate to jump into a python code-base that isn't standard, such as using @awhen decorator instead of a normal if ;-) What about you? But in Lisp, there's no difference in the syntax.. and adding missing features to the language instead of repeating the same pattern is the standard way to code.