5 ms·
Macros can be used in python. There are a few libraries that help make it easier(so you do not need to manipulate the ast yourself). For example: @macro
by illumen 16y ago
Macros can be used in python.
There are a few libraries that help make it easier(so you do not need to manipulate the ast yourself). For example:
@macro
def macroname(arg1, arg2):
... macro contents ...
There's some current information for you old time lispers, so next time you don't sound so dated in your Battles with Trolls in the great never ending language war flames ;)
- forensic 16y agoI like how you imply that you don't participate in the language wars. When you just did.
- deleted 16y ago[deleted]
- apgwoz 16y agoLink? The only "macro" library I've seen for python has been "MetaPython" (http://metapython.org/ http://metapython.org/), which is more of a let down than it is useful, unfortunately.
- jpr 16y agoEven if that happened to work correctly (which I don't believe), you would still be missing a bunch of macro-related stuff that makes CL the programmable programming language it is, and Python isn't: -reader-macros -symbol-macros -compiler-macros -macrolet -symbol-macrolet EDIT: Fixed layout
- lpsmith 16y agoWell, those kinds of claims are kind of par for the course for the Python community. I remember that it was commonly claimed that Python 1.5 had the "full power of the lambda calculus", when all it had was anonymous function definitions, and not true higher order functions.