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

More docs/examples for structs/constructors #315

Closed
oxinabox opened this issue Mar 24, 2021 · 0 comments · Fixed by #366
Closed

More docs/examples for structs/constructors #315

oxinabox opened this issue Mar 24, 2021 · 0 comments · Fixed by #366
Labels
documentation Improvements or additions to documentation

Comments

@oxinabox
Copy link
Member

oxinabox commented Mar 24, 2021

How to work with struct:

Although there is a good documentation on Composite it would be cool to have some concrete examples on how to use it. For example, should a pullback return a Composite or a NamedTuple for a struct argument? Also maybe warn that by default the output from a constructor will be a Composite etc...

Constructor rules:

Similarly to the previous point, I saw a lot of confusion on how to properly define rrule for constructors and objects acting as functions. Having a small example explaining that for a constructor ::Type{Object} should be used, or directly ::Object would make it more clear

originally posted by @theogf in #313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant