Skip to content

How can we implement macros #169

@ssrangisetti

Description

@ssrangisetti

The approach I am taking is to make macro similar to lambda and pass arguments as q expressions and macro would return q expression which I will evaluate. But since we cannot create s expressions macros have to return them as q expressions (eg. (* (+ 1 2) 3) will be returned as {* {+ 1 2} 3}). But I am having issues with differentiating between actual q expressions and s expressions converted to q expressions. I have tried using keyword qexpr like {qexpr {a b c d}} would represent {a b c d} but this approach fails if we ever use join on this.

Is it possible to implement macros without any special syntax like quote? Or is quote actually required for having macro support

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions