Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

specify the annotation introspection API and constant evaluation API #3408

Merged
merged 3 commits into from
Oct 24, 2023

Conversation

jakemac53
Copy link
Contributor

@jakemac53 jakemac53 commented Oct 17, 2023

Updates to annotation introspection based on recent discussions, and in anticipation of changing the rules around shadowing.

The primary concrete change here is that we only allow access to identifiers/constructors from separate strongly connected components. This works around any issues with the constants changing between phases.

I decided not to try and restrict the API to code objects that came from annotations, so this does enable general purpose const evaluation, but it doesn't seem any more problematic to me than allowing the evaluation of const expressions from annotations. Please correct me if I am wrong :).

cc @scheglov @johnniwinther

@jakemac53 jakemac53 added the static-metaprogramming Issues related to static metaprogramming label Oct 17, 2023
@jakemac53 jakemac53 requested a review from munificent October 17, 2023 21:47
working/macros/feature-specification.md Outdated Show resolved Hide resolved
working/macros/feature-specification.md Outdated Show resolved Hide resolved
@jakemac53 jakemac53 merged commit d03dbe9 into main Oct 24, 2023
3 checks passed
@jakemac53 jakemac53 deleted the annotations branch October 24, 2023 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
static-metaprogramming Issues related to static metaprogramming
Projects
Development

Successfully merging this pull request may close these issues.

3 participants