JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
44.99k stars 5.42k forks source link

Docs talk about removed "Leaf types" #55044

Open Seelengrab opened 3 days ago

Seelengrab commented 3 days ago

isleaftype was removed in 2018 in https://github.com/JuliaLang/julia/pull/25496, but unfortunately the FFI docs still refer to the concept:

https://github.com/JuliaLang/julia/blob/59f08df99bf8d73ed1d41104b82062f328ee5926/doc/src/manual/calling-c-and-fortran-code.md?plain=1#L281

https://github.com/JuliaLang/julia/blob/59f08df99bf8d73ed1d41104b82062f328ee5926/doc/src/manual/calling-c-and-fortran-code.md?plain=1#L288

https://github.com/JuliaLang/julia/blob/59f08df99bf8d73ed1d41104b82062f328ee5926/doc/src/manual/calling-c-and-fortran-code.md?plain=1#L629

https://github.com/JuliaLang/julia/blob/59f08df99bf8d73ed1d41104b82062f328ee5926/doc/src/manual/calling-c-and-fortran-code.md?plain=1#L682

As do the performance tips:

https://github.com/JuliaLang/julia/blob/59f08df99bf8d73ed1d41104b82062f328ee5926/doc/src/manual/performance-tips.md?plain=1#L808

https://github.com/JuliaLang/julia/blob/59f08df99bf8d73ed1d41104b82062f328ee5926/doc/src/manual/performance-tips.md?plain=1#L824

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.

vtjnash commented 3 days ago

That looks like it should have been corrected to say isconcretetype at the time

Seelengrab commented 3 days ago

In both the FFI docs & performance tips?