Skip to content

Future goals and ideas #17

@dumblob

Description

@dumblob

Any plans to make the "structural" constructs (if, times, macro, ...) "complete" as follows?

  1. allow to nest them arbitrarily without side effects
  2. in case of times it's not only about i, but also about missing break (to simulate infinite loop or a while loop)
  3. in case of macro it's about "hygiene" - i.e. any variable from the argument list shall be automatically "shadowed" in case of (both direct & indirect) recursion (now variables seem to be overwritten instead of always shadowed)
  4. allow passing a macro to a macro without first expanding it (and implement also support for explicit expansion)

Ad 4: Maybe instead of:

````
macro m1 m2 begin ... m2 ... endmacro
macro m2 begin ... endmacro
m1 m2
````

just write:

````
macro m1 ( m2 ) begin ... expand m2 ... endmacro  # parenthesis in argument list are significant and denote the level of "quoting"; the "expand" command will try to strip one level of quoting and if none to be stripped, just expand it instead
macro m2 begin ... endmacro
m1 m2
````

I'm aware the point (3) goes against the "variables are global" mantra, but it'd make macros so much more useful and with that whole t2b.

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