You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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
def
s.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
The text was updated successfully, but these errors were encountered: