Skip to content

More docs/examples for structs/constructors #315

@oxinabox

Description

@oxinabox

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions