3 ms·
Macros for python have been recently proposed [1], and oh boy aren't they ugly! [1] https://www.python.org/dev/peps/pep-0638/ https://www.python.org/dev/peps/p
by blackbear_ 6y ago
Macros for python have been recently proposed [1], and oh boy aren't they ugly!
[1] https://www.python.org/dev/peps/pep-0638/ https://www.python.org/dev/peps/pep-0638/
- phoe-krk 6y agoI'm glad they've finally been proposed, as ugly as they need to be in Python. It's not even about full homoiconicity; a language which is capable of easily understanding its own symbolic representation along with quote/unquote, as opposed to the direct AST representation, is capable of having somewhat bearable macros. See Elixir for a good example, e.g. at https://elixir-lang.org/getting-started/meta/macros.html https://elixir-lang.org/getting-started/meta/macros.html.