-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Document Fix1 and Fix2 #36094
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
Document Fix1 and Fix2 #36094
Conversation
|
This makes them somewhat of an official API which definitely needs some consideration. @JeffBezanson, how do you feel about making these more official? |
|
Aren't they already somewhat official? They are already mentioned from docstring of functions like https://docs.julialang.org/en/v1/base/base/#Base.isequal It says
From reading this, it'd assume that |
|
FWIW this is why I don't like documenting internals with docstrings. So easy for someone to just add a reference to it and all of a sudden it is public API. |
If you mean I think the docstring of
Of course, if the intention was to explain the idea behind the implementation (which is OK to do in a public docstring), we can clarify that. But this is a (But I think exposing |
I know, this was just a (slightly tangential) remark that it becomes hard for people to know what is public API with internals having docstring and it is easy to accidentally make something public by e.g. referencing it from something that actually is shown in the docs. |
|
Well, that's my whole motivation for clearly documenting what public API means #35715. I think it's a big loss if we discourage documenting/doctesting internals just for avoiding API missuses. Mentioning the definition of public API in the documentation may not be enough. But I think tooling-based fixes would be better than discouraging internal documentation. Meanwhile, maybe we can use some kind of marker when adding docstrings to internal: |
|
I hope that A fluent-style, single argument version would be really nice. However, if one attempts to use that, here's what we currently get.... If we could reliably know that Is it appropriate to rely upon |
vtjnash
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see us changing these, and we already use them for enhanced dispatch internally. I think it is reasonable to allow other packages to do the same. I'll merge if no objections soon.
I worry that On the other hand, I think it may be possible to generalize it, and introduce |
|
Could someone comment on whether this would be breaking:
|
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Co-authored-by: Jameson Nash <vtjnash@gmail.com>
Fix1andFix2are already mentioned from many binary functions likejulia/base/operators.jl
Lines 950 to 959 in 7301dc6
They also have clear documentation
julia/base/operators.jl
Lines 916 to 922 in 7301dc6
julia/base/operators.jl
Lines 933 to 939 in 7301dc6
I think it makes sense to list them in the documentation.