Update tutorial_macros.rst (#5715)

This removes the false statement that Haskell and other functional programming languages does need nor not have macros.

Lisp is a functional programming language with macros at the core of the language. For Haskell specifically its called [Template Haskell](https://wiki.haskell.org/Template_Haskell).

There's also Erlang which has a token based macro system, something between the C preprocessor and Lisp. Elixir, a newer language in the same ecosystem as Erlang, has full procedural macros. This is similar to the macros in Xonsh; regular functions that take AST nodes as input and return a, potentially different, AST node.
This commit is contained in:
Max Nordlund 2024-10-30 14:11:04 +01:00 committed by GitHub
parent 442e0a4968
commit 2d07ae8698
Failed to generate hash of commit

View file

@ -44,8 +44,6 @@ from being consumed.
Other languages like Lisp, Forth, and Julia also provide their macro systems. Other languages like Lisp, Forth, and Julia also provide their macro systems.
Even restructured text (rST) directives could be considered macros. Even restructured text (rST) directives could be considered macros.
Haskell and other more purely functional languages do not need macros (since
evaluation is lazy anyway), and so do not have them.
If these seem unfamiliar to the Python world, note that Jupyter and IPython If these seem unfamiliar to the Python world, note that Jupyter and IPython
magics ``%`` and ``%%`` are macros! magics ``%`` and ``%%`` are macros!