{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/12064","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/12064/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/12064/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/12064/events","html_url":"https://github.com/JuliaLang/julia/issues/12064","id":93786405,"number":12064,"title":"Document privacy of type-fields","user":{"login":"mauro3","id":4098145,"avatar_url":"https://avatars.githubusercontent.com/u/4098145?v=3","gravatar_id":"","url":"https://api.github.com/users/mauro3","html_url":"https://github.com/mauro3","followers_url":"https://api.github.com/users/mauro3/followers","following_url":"https://api.github.com/users/mauro3/following{/other_user}","gists_url":"https://api.github.com/users/mauro3/gists{/gist_id}","starred_url":"https://api.github.com/users/mauro3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mauro3/subscriptions","organizations_url":"https://api.github.com/users/mauro3/orgs","repos_url":"https://api.github.com/users/mauro3/repos","events_url":"https://api.github.com/users/mauro3/events{/privacy}","received_events_url":"https://api.github.com/users/mauro3/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-08T13:13:46Z","updated_at":"2015-07-08T13:41:59Z","closed_at":null,"body":"It is not documented that fields of types are considered private (at least by some people), as @nalimilan mentioned over in [julia-users]( https://groups.google.com/d/msg/julia-users/yC-sw9ykZwM/-607E_FPtl0J).  It's probably worth giving some guidelines when fields are considered private.  As that is probably not always true, for instance when using a type just to store stuff.\r\n\r\nAlso, using an leading underscore is sometimes used to denote privacy of methods or (extra?) privacy of fields.  When should `_` be used vs just assume privacy of fields?  When should methods use a `_`?\r\n\r\nIt is probably worthwhile to reach some sort of consensus about this and documenting it before going forward with field overloading (#1974 and PR #5848)."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/119582728","html_url":"https://github.com/JuliaLang/julia/issues/12064#issuecomment-119582728","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/12064","id":119582728,"user":{"login":"KristofferC","id":1282691,"avatar_url":"https://avatars.githubusercontent.com/u/1282691?v=3","gravatar_id":"","url":"https://api.github.com/users/KristofferC","html_url":"https://github.com/KristofferC","followers_url":"https://api.github.com/users/KristofferC/followers","following_url":"https://api.github.com/users/KristofferC/following{/other_user}","gists_url":"https://api.github.com/users/KristofferC/gists{/gist_id}","starred_url":"https://api.github.com/users/KristofferC/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KristofferC/subscriptions","organizations_url":"https://api.github.com/users/KristofferC/orgs","repos_url":"https://api.github.com/users/KristofferC/repos","events_url":"https://api.github.com/users/KristofferC/events{/privacy}","received_events_url":"https://api.github.com/users/KristofferC/received_events","type":"User","site_admin":false},"created_at":"2015-07-08T13:41:59Z","updated_at":"2015-07-08T13:41:59Z","body":"Field overloading would give the same flexibility to the dot notation as the `@property` annotation in Python, right? In that case we could just adopt the same convention as Python, fields are considered public by default unless they start with an underscore. Direct field access is no longer problematic since the implementation can now change in a backwards compatible way by overloading the field access."}}