Skip to content

Add basic hands on tutorial #5493

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

Merged

Conversation

nicolasstucki
Copy link
Contributor

No description provided.

@nicolasstucki nicolasstucki force-pushed the add-tasty-reflect-basic-tutorial branch from 68b57b3 to c514aaa Compare November 22, 2018 14:42
Copy link
Contributor

@liufengyun liufengyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

We could add more links to different category/examples of macros/meta-programs, this is what readers expect.

`quoted.Expr` and `quoted.Type` are opaque TASTs.
The opaqueness required in [Principled Meta-programming](./principled-meta-programming.html) provide the guarantee that
the generation of code of the macro will be type correct.
Using TASTy reflect will break these guarantees and may fail at macro expansion time, hence additional explicit check must be done.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also agree.

}
```

`import reflection._` will provide a `reflect` extension method on `quoted.Expr` and `quoted.Type` with return a `reflection.Term` and `reflection.TypeTree` respectivly.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"which returns"

@nicolasstucki nicolasstucki merged commit e4bb0b4 into scala:master Nov 26, 2018
@nicolasstucki nicolasstucki deleted the add-tasty-reflect-basic-tutorial branch November 26, 2018 17:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants