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.
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 keyword #50105
Add public keyword #50105
Changes from 21 commits
5b3d8c1
665855e
52f519e
03f9e02
7eb64a2
c7192ea
ec3b2f3
804f5ef
7d404f0
4dc10c4
5fd1f64
b85ae46
acc928a
a5162c2
aacc187
145ad7f
aea3d22
f7d57ba
34844bb
8241760
920244a
9e61f96
f75cb68
db7ba05
7dbdd5e
ac11ea4
bd0ee87
1dc9652
17b8834
6e2ddec
1000988
c5955c0
5ed2c7d
5da758e
de8be2b
d75725b
05352df
4b04f31
051f824
8a56ab4
6e2d809
69cf8d4
9d74beb
4b18e1d
4ba71ab
ce3a798
ca8eb44
6d1e2c7
2678523
528469b
082fb86
3d09dae
12bab72
0112e2c
66427c6
067d69c
b688b60
6ce6fdb
e57c63f
1a6e3dc
ebcdf24
d4418fe
c4924c9
5835699
153b538
158d59f
41f3729
fd5fb90
ea7a141
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Add
Filesystem
,Sorting
,Math
,Orders
, and possibly others?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.
Filesystem
,Sort
, andOrder
, yes. ForMath
, I think all public symobls in Math are already exported from Base so there is no need.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.
Did we decide to try making new keywords here correspond somehow to the flags in
jl_binding_t
so that the filtering behavior ofnames()
is much easier to specify? I forgot which conclusion we came to!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.
Should we throw if
qualified=false
andall=true
? These keywords seem poorly named and inconsistent. Let's change this.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.
"If qualified is false, then return only exported names, not public but unexported names."
only exported names that are unexported names?
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 have a possible solution:
This docstring should fully describe the proposed behavior and so is ready for review. If the docstring doesn't make it completely clear what I mean, then it's not a good enough docstring.
I'm holding back on implementing this until I know what
jl_atomic_load_relaxed(&b->owner) == b
means.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 think
hidden
is documented elsewhere and I don't know what "compiler-generated names" refers to.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.
Edited to explain
hidden
a bit more.tbh I'm not entirely sure what the deal with compiler-generated names is. They typically start with an
#
, and they are an implementation detail, so maybe we shouldn't expose them at all. Because compiler-generated names are an implementation detail, it is technically not a violation of symver to makeall=true
no longer return them because their very existence was never guaranteed to continue.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 think calling this "hidden" is a good idea, if we want to expose this at all. It just seems like another easy-to-confuse thing, thinking of "object hiding" in other languages.
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've never heard of "object hiding", would you provide a link please?
I called this
hidden
because that is the variable name used on the c side already.If you would prefer a different name, feel free to recommend one.
All words have multiple existing meanings, and most applicable words have existing meanings in other programming languages. Because all translation is lossy, those meanings will never perfectly align with the meaning of a word in Julia. For example, the concept of "data hiding" in c++ is similar to, though not identical to this usage of the word hiding. The main difference is that "data hiding" refers to hiding data, specifically, and this case, which is not prefixed with "data", is not data specific. This case also follows the Julian model of making things harder to reach rather than prohibiting access altogether. Examining c++'s usage of the term "data hiding" makes me more rather than less inclined to call this concept "hiding" here.
It is possible to not expose this at all, but that comes at the cost of not covering all of the existing functionality provided by the
all
keyword.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.
Apologies for not using the exact terminology. I was indeed referring to "data hiding" or "information hiding". I used "object hiding" here because in Julia, this has the effect of generally hiding any object. The semantic meaning is the same. It's precisely this closeness to the existing concept that's the reason for my objection.
This file was deleted.
This file was deleted.
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 are still some symbols which are documented in the manual and not yet marked as public (e.g.
Base.EnvDict
). Is there a plan to try to find them all? otherwise should we also keep around for the time being the old version mentioning 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.
I sorta responded to this way up the thread: #50105 (comment)
The plan is to find them all by 1.11. #51335.
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.
Mostly it's a joke, an alternative to "it's not", and also what I would consider a reasonable estimate unless we come out with a mostly non-breaking 2.0 much sooner, which is more likely.
In any event, "When is Julia 2.0 coming out?" is frequently asked.
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.
This shouldn't be part of this PR.
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.
Probably. I added it because of
https://github.com/JuliaLang/julia/pull/50105/files#diff-3591da1fafe13d9fcae96e5b32a9492c6fb68b7e33ac0810b106b09b45d59534R49-R50