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

mention use of underscore for private fields in manual #40131

Merged
merged 3 commits into from
Mar 22, 2021

Conversation

simeonschaub
Copy link
Member

I wasn't sure whether this should be mentioned both in the Variables section and in the style guide. I also noticed the ! convention was not mentioned in the style guide, so I added that as well, but I can remove that part if this is not the right place.

Ref #40127

@simeonschaub simeonschaub added the domain:docs This change adds or pertains to documentation label Mar 21, 2021
@DilumAluthge
Copy link
Member

I would make them two different bullet points.

@stevengj stevengj merged commit 5e5484c into master Mar 22, 2021
@stevengj stevengj deleted the sds/underscore_docs branch March 22, 2021 20:39
@KristofferC
Copy link
Sponsor Member

KristofferC commented Mar 22, 2021

Eh, I must say I personally don't really like this. This gives the notion that functions without underscore are somehow public which isn't true at all. Just looking at Base, there are almost no functions with underscore but most functions are private.

@simeonschaub
Copy link
Member Author

I see what you mean. Maybe something more like:

prefer identifiers starting with _ to denote functions, macros or variables that are only for internal use.

ElOceanografo pushed a commit to ElOceanografo/julia that referenced this pull request May 4, 2021
* Update variables.md

* Update style-guide.md

* Apply suggestions from code review
antoine-levitt pushed a commit to antoine-levitt/julia that referenced this pull request May 9, 2021
* Update variables.md

* Update style-guide.md

* Apply suggestions from code review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
domain:docs This change adds or pertains to documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants