Skip to content

Ref docstring should note clearly that it's an abstract type #55321

@DanielVandH

Description

@DanielVandH

The docstring for Ref gives no indication that it's an abstract type (or, if it does and I've missed it, it certainly isn't clear). I think there should be a note or admonition warning that the type Ref{T} is an abstract type, since I don't believe it is as widely known that this is the case.

Indeed, searching for ::Ref in package codes shows a good amount of code that uses it as the type for a field in a struct, which I imagine the majority of authors are doing under the impression that it's a concrete type

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsThis change adds or pertains to documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions