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

add public statement to Base.Broadcast #54060

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

matthias314
Copy link
Contributor

@matthias314 matthias314 commented Apr 12, 2024

This PR makes the following symbols from Base.Broadcast public:

  • Symbols appearing in the documentation, with docstring
AbstractArrayStyle
ArrayStyle
Broadcasted
DefaultArrayStyle
Style
combine_axes
combine_styles
flatten
instantiate
result_style
  • Symbols appearing in the documentation, without docstring
Unknown
  • Symbols not appearing in the documentation, with docstring
materialize

I think it makes sense to make it public given that Broadcasted is also public.

  • Symbols not appearing in the documentation, without docstring
DefaultMatrixStyle
DefaultVectorStyle

I think it makes sense to have them available as shortcuts. Maybe one should even mention them in the documentation instead of using DefaultArrayStyle{1}, for example.

EDIT: Making DefaultVectorStyle and DefaultMatrixStyle public leads to failing doctests because they now appear in the Julia output instead of DefaultArrayStyle{1} and DefaultArrayStyle{2}. However, they are never used in broadcast.jl. If one doesn't want to have them public, why are they defined at all? Let me know if you want to have them public. Then I adjust the documentation.

  • The following functions have been left out although they have docstrings:
broadcast_preserving_zero_d
broadcast_shape
make_makeargs
newindex
_broadcast_getindex
  • The following symbol (with docstring) is currently exported without appearing in the documentation:
BroadcastFunction

@matthias314 matthias314 changed the title add public statement to broadcast.jl add public statement to Base.Broadcast Apr 12, 2024
@matthias314
Copy link
Contributor Author

matthias314 commented Apr 14, 2024

I've removed DefaultVectorStyle and DefaultMatrixStyle from the list of public symbols.

@matthias314
Copy link
Contributor Author

@LilithHafner Any feedback on this?

@LilithHafner
Copy link
Member

Thanks for the bump.

  • I don't think we should mark anything without a docstring as public without also adding a docstring.
  • I don't know the broadcast internals well enough to provide robust feedback on the specific choices here but I'll try to find someone(s) who is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants