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

Method is public, but not documented #53971

Open
nsajko opened this issue Apr 5, 2024 · 3 comments
Open

Method is public, but not documented #53971

nsajko opened this issue Apr 5, 2024 · 3 comments
Labels
docs This change adds or pertains to documentation

Comments

@nsajko
Copy link
Contributor

nsajko commented Apr 5, 2024

We have Base.ispublic(Core, :Method), but Method is not documented. Should it be private?

@LilithHafner
Copy link
Member

It's too late to make it private

x@fedora:~/.julia/dev/AliasTables$ julia +release
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.10.2 (2024-03-01)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> Method
Method

We could explicitly declare its fields to be private (fields are private by default already)

@stevengj
Copy link
Member

stevengj commented Apr 6, 2024

I added the following undocumented public symbols from Core to #52725:

AtomicMemoryRef, ConcurrencyViolationError, Exception, GenericMemoryRef, GlobalRef, IO, LineNumberNode, Method, SegmentationFault, TypeVar, arrayref, arrayset, arraysize, const_arrayref

@stevengj
Copy link
Member

stevengj commented Apr 6, 2024

The methods function is documented and has been widely used for ages, and it returns an iterator whose eltype is Method.

So, whether this type was exported or not, I would argue that it is effectively part of the public API by virtue of being returned by a documented function.

@stevengj stevengj added the docs This change adds or pertains to documentation label Apr 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation
Projects
None yet
Development

No branches or pull requests

3 participants