Replies: 1 comment
-
This issue is requesting attributes but seems to more deeply be asking for macros in some form. These are not necessarily related so it may be helpful to narrow things down some more:
Meta programming can be a topic that has sweeping implications for tooling and code readability so I think it is helpful to identify some concrete use cases and boundaries for it. I also think meta programming (like lifetimes) is one place where we should diverge from rust. Proc-macros in general are far too complex and if we need something similar I'd prefer to swap them out wholesale with another system without the same limitations/complexity. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem
In my perfect world, noir would support for macros, a way to get there is to allow for arbitrary attibutes names that are not restricted to some built in functionality like blackbox or oracle calls.
e.g.
Here is a hacky alternative I tried to create on a branch 2550c95. Which has a purpose of creating a pseudo macro system (warning its complete spaghetti code)
Here is the diff in aztec library : https://github.com/AztecProtocol/aztec-packages/blob/b007330e24bb18932acd75f39b25efed1d1959aa/yarn-project/noir-contracts/src/contracts/private_token_contract/src/main.nr
Happy Case
Alternatives Considered
Additional Context
Would you like to submit a PR for this Issue?
No
Support Needs
Beta Was this translation helpful? Give feedback.
All reactions