-
Notifications
You must be signed in to change notification settings - Fork 173
Resolve the default access modifier to Public or Internal in the syntax tree #835
Conversation
|
I am a bit hesitant on the rename from Even though this is the compiler implementation and not documentation, I think it would be easier for both contributors and users of the compiler public APIs if we used a more familiar term. I am not completely opposed to the rename but I would like to know what other people think. @ScottCarda-MS, @swernli, @bettinaheim do you have an opinion about renaming |
I agree with the sentiment @cesarzc made. It is better to use terms that are already out there and familiar to programmers. Additionally, changing the name is a breaking change that I don't think is particularly necessary here, although the behavior of the modifiers is changing in a breaking change anyway. Not changing the name would also make for a much smaller PR with much less code changes, which is always appreciated :) . |
It's not strictly necessary, but (1) the removal of I could call it |
|
I don't have strong feelings about changing the name vs not, but I think that the name |
|
I like Sarah's suggestion of calling it |
This reverts commit 7c8a675.
|
Renamed |
cesarzc
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.
Looks good to me.
Updates access modifiers to be
Internal | Publicinstead ofDefaultAccess | Internal. In the unresolved syntax tree, a default access modifier isQsNullable.Nullinstead ofDefaultAccess. In the resolved syntax tree, it's set toPublic, which is the default. This way, AST transformations don't need to know what the default access is, and access modifiers can be compared using standard comparison operators like<orMin.Requires microsoft/qsharp-runtime#481. Closes #667.