Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.lisp > #61616

Re: implementing scheme - implementing macros

From Kragen Javier Sitaker <kragen@canonical.org>
Newsgroups comp.lang.lisp
Subject Re: implementing scheme - implementing macros
Date 2026-08-29 17:15 -0300
Organization Primarily biological and memetic
Message-ID <87qzjg7kfc.fsf@debian> (permalink)
References <110hst1$2gjgb$1@dont-email.me> <20260623124622.64@kylheku.com>

Show all headers | View raw


Kaz Kylheku <046-301-5902@kylheku.com> writes:
> On 2026-06-12, Mario Rosell <mario@mariorosell.es> wrote:
>> I am trying implement macros, and don't really know how to implement them.
>> Scheme has a pretty complex macro system, so for now I am trying to
>> implement defmacro and then implement define-syntax, syntax-case, etc.
>
> There exists more than one algorithm for hygienic macros. (...)
> Kohlbecker's algorithm (1986) (...) William Clinger's 1990 paper,
> "Macros That Work"

This can be one of the hairiest parts of implementing Scheme, but there
are off-the-shelf free-software library implementations of Clinger’s
algorithm that you can “just” drop into your Scheme if you want.
They're several thousand lines of code, and you’ll likely have to
macroexpand them first on an existing Scheme.  The other respondents who
think they’re just quasiquotation plus eval, similar to Common Lisp
macros, are being far too optimistic; they will be in for a big surprise
if they ever try to implement Scheme macros themselves.

Kragen

Back to comp.lang.lisp | Previous | Next — Previous in thread | Find similar | Unroll thread


Thread

implementing scheme - implementing macros Mario Rosell <mario@mariorosell.es> - 2026-06-12 21:15 +0000
  Re: implementing scheme - implementing macros steve g <Sgonedes1977@gmail.com> - 2026-06-16 21:50 -0400
    Re: implementing scheme - implementing macros Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-06-17 03:14 +0000
    Re: implementing scheme - implementing macros Paul Rubin <no.email@nospam.invalid> - 2026-06-16 21:45 -0700
      Re: implementing scheme - implementing macros steve g <Sgonedes1977@gmail.com> - 2026-06-19 23:15 -0400
  Re: implementing scheme - implementing macros antispam@fricas.org (Waldek Hebisch) - 2026-06-17 14:26 +0000
  Re: implementing scheme - implementing macros Kaz Kylheku <046-301-5902@kylheku.com> - 2026-06-23 20:59 +0000
    Re: implementing scheme - implementing macros Stefan Monnier <monnier@iro.umontreal.ca> - 2026-06-25 10:59 -0400
    Re: implementing scheme - implementing macros Kragen Javier Sitaker <kragen@canonical.org> - 2026-08-29 17:15 -0300

csiph-web