-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
mention typeof functions in types docs #41855
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
Merged
fredrikekre
merged 9 commits into
JuliaLang:master
from
tpapp:tp/document-typeof-functions
Aug 17, 2021
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9c0b72e
mention typeof functions in types docs
tpapp fec25e0
Update doc/src/manual/types.md
tpapp ea277ee
Update doc/src/manual/types.md
tpapp 1570a98
Update doc/src/manual/types.md
tpapp 4b71910
Update doc/src/manual/types.md
tpapp 0925e07
fix typo in docstest
tpapp fbb5590
preserve info between doctests
tpapp 52a2dd6
Refer to anonymous functions, mention closures in passing.
tpapp 268f9d9
use closure
tpapp File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
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.
Isn't closures having fields an implementation detail, something we would not necessarily want to expose in the user manual?
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 wouldn't call that an implementation detail. It is a defining feature of closures.
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.
It doesn't sound like a defining feature of closures, after all they were implemented differently in the past, and the field names could have been made unavailable through
getproperty
even with the current implementation. But I don't know whether that's now specified somewhere in the documentation.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.
It's in the dev docs.
Incidentally, is it OK to link devdocs in the user manual?
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 actually didn't know that, thanks! I suspect that changing this now would be quite breaking, so we can probably document this somewhere, but we can leave it out of this PR for now.
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 didn't notice that at first. We should probably have something on closures n the regular docs as well, but for now, maybe we can just have the link point to
anonymous functions
instead, since in most cases they are actually closures as well.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.
Thanks. As the "dev docs" document Julia internals, I wouldn't link to the them from the user manual. To show the point here, you might insert in the sessions
addy(1) === addy(2) # false
, and/or maybe show the output ofaddy(1)
(i.e.var"#3#4"{Int64}(1)
, which hints at the implementation detail).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.
Thanks, I added that example, and now only refer to closures in passing.