Skip to content
This repository has been archived by the owner on Dec 7, 2024. It is now read-only.

Different forms of define arguments. #571

Open
KarlSchimpf opened this issue Apr 27, 2017 · 0 comments
Open

Different forms of define arguments. #571

KarlSchimpf opened this issue Apr 27, 2017 · 0 comments

Comments

@KarlSchimpf
Copy link
Contributor

Currently, all arguments to a define are "pass by expression", matching a structured form of a static macro call. To add more power, we would really like to allow many different forms of parameter passing (done at the Eval node). The proposed new parameter forms are:

(params) - The define gets no arguments.

(params n) - The define gets N values. These values are evaluated before they are passed to the define.

(exprs n) - The define gets n expressions that are only evaluated on demand, within the define.

(exprs.cached n) - The define gets n expressions, but the data for expressions are cached at the point of the call, rather than on demand. When reading, this allows the same data to be read multiple times, effectively allowing the insertion of multiple copies.

(cached) - The data for the macro (and not its arguments) is cached, based on the single argument value passed in.

(args E1 ... EN) - A mixed list of arguments, composed by its arguments, each of which can be one of the previous argument specifiers.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant