Skip to content

HasEltype and EltypeUnknown should be public from Base? #56898

Open
@nsajko

Description

@nsajko
julia> Base.ispublic(Base, :HasEltype)
false

julia> Base.ispublic(Base, :EltypeUnknown)
false

julia> versioninfo()
Julia Version 1.12.0-DEV.1757
Commit 06f988b7415 (2024-12-14 21:20 UTC)
Build Info:
  Official https://julialang.org release
Platform Info:
  OS: Linux (x86_64-linux-gnu)
  CPU: 8 × AMD Ryzen 3 5300U with Radeon Graphics
  WORD_SIZE: 64
  LLVM: libLLVM-18.1.7 (ORCJIT, znver2)
Threads: 9 default, 0 interactive, 8 GC (on 8 virtual cores)

These are widely used and a part of the iteration interface. That said, they don't have doc strings, and although they're mentioned in the Manual, it was never completely clear to me what each of them means. As far as I gather, the only significance is that the choice affects the behavior of collect, and perhaps some similar functions in the ecosystem: EltypeUnknown indicates that eltype should not be relied on for collect.

Metadata

Metadata

Assignees

No one assigned

    Labels

    designDesign of APIs or of the language itselfdocsThis change adds or pertains to documentationiterationInvolves iteration or the iteration protocol

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions