Skip to content
New issue

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

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

Already on GitHub? # to your account

Look into macro annotations to improve experience #84

Closed
davesmith00000 opened this issue Feb 11, 2023 · 1 comment
Closed

Look into macro annotations to improve experience #84

davesmith00000 opened this issue Feb 11, 2023 · 1 comment

Comments

@davesmith00000
Copy link
Member

The inline def macro approach is serving me well in general but has a few shortcomings. I have hopes that we'll be able to do a better job with macro annotations because (I hope, I assume) we can annotate more than just defs.

Macro annotations are currently experimental, but they are available.

Doc link:
https://dotty.epfl.ch/api/scala/annotation/MacroAnnotation.html

A PR that defines addClass macros based on annotations, it's a good example:
scala/scala3#16534

@davesmith00000
Copy link
Member Author

Closing. I've looked into macro annotations now. Very interesting, however, I do not believe they will allow the kind of code sharing and reuse we can achieve with inline macros. It's a shame, because the AST is much cleaner, but you can only see what is directly under the annotation.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant