Skip to content

Introduce macros back into scm-slang #176

@s-kybound

Description

@s-kybound

The changes in #165 have turned scm-slang into a conductor-compatible language evaluator, which is good news. However, the migration targets Scheme chapter 1, which loses prior work to enable continuations and macros in the Scheme implementation. However, we now use our own version of the CSE machine, which is also good news as it potentially allows us to add special instructions for the CSE machine.

In the older scm-slang version, macros were introduced by introducing lists as program fragments into the Control stack. The CSE machine would match such lists with defined macro patterns. eval was introduced by shifting a list from the Stash to the Control, and quote was introduced by shifting a list from the Control to the Stash. In this way, macros were defined and executed at runtime. A better way may be discovered, especially in order to deal with hygienic macros, which were never properly implemented before.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions