News for hackers. Stuff that matters.
Re:Elixir, a functional metaprogramming-aware language built... by klibertp on Sunday April 28, 2013 @08:24AM (#5620978)
You're most likely incorrect - I cannot be sure about Racket back when it wasn't called that, but Scheme hygienic macro systems - those created with SYNTAX-RULES - are Turing complete. Look here for a "primer" which explains how to 'loop' (by means of recursion) and branch with pattern matching. At the end of a tutorial you can find basic Scheme interpreter written as a set of Scheme macros.

For example, in terms of this macro system, you can (and you could for a long time) define a simplest non-terminating macro like this:

    (define-syntax loop
        (syntax-rules ()
            ((loop) (loop))))
Racket Macro Stepper gives a following warning when used to step through the macro expansion:

    Macro expansion has taken a suspiciously large number of steps.

    Click Stop to stop macro expansion and see the steps taken so far, or
    click Continue to let it run a bit longer.

There are no comments on this comment yet.