Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HasEltype and EltypeUnknown should be public from Base? #56898

Open
nsajko opened this issue Dec 24, 2024 · 1 comment
Open

HasEltype and EltypeUnknown should be public from Base? #56898

nsajko opened this issue Dec 24, 2024 · 1 comment
Labels
design Design of APIs or of the language itself docs This change adds or pertains to documentation iteration Involves iteration or the iteration protocol

Comments

@nsajko
Copy link
Contributor

nsajko commented Dec 24, 2024

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.

@nsajko nsajko added design Design of APIs or of the language itself docs This change adds or pertains to documentation iteration Involves iteration or the iteration protocol labels Dec 24, 2024
@jishnub
Copy link
Contributor

jishnub commented Dec 25, 2024

Irrespective of whether these are made public, we may certainly add docstrings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Design of APIs or of the language itself docs This change adds or pertains to documentation iteration Involves iteration or the iteration protocol
Projects
None yet
Development

No branches or pull requests

2 participants