Skip to content

Docs talk about removed "Leaf types" #55044

@Seelengrab

Description

@Seelengrab

isleaftype was removed in 2018 in #25496, but unfortunately the FFI docs still refer to the concept:

| `mutable struct` | `BitSet` | "Leaf Type" :: A group of related data that includes a type-tag, is managed by the Julia GC, and is defined by object-identity. The type parameters of a leaf type must be fully defined (no `TypeVars` are allowed) in order for the instance to be constructed. |

| `struct ...; end` | `nothing` | "Singleton" :: a Leaf Type or Struct with no fields. |

* `T`, where `T` is a Julia leaf type

* `T`, where `T` is a Julia Leaf Type

As do the performance tips:

The following examples may help you interpret expressions marked as containing non-leaf types:

* Interpretation: getting a field that is of non-leaf type. In this case, the type of `x`, say `ArrayContainer`, had a

The performance docs are particularly unfortunate, because they don't introduce the term and don't point to another place that has a correct definition. Further, since "leaf type-ness" is not queryable anymore, the ccalling docs end up being a bit confusing in terms of what a corresponding type would even be.

There's this comment by @vtjnash clarifying the situation back when this was decided, so that'd be a good starting point for finding a wording that is both accurate & uses up-to-date terminology.

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