{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/16770","repository_url":"https://api.github.com/repos/JuliaLang/julia","labels_url":"https://api.github.com/repos/JuliaLang/julia/issues/16770/labels{/name}","comments_url":"https://api.github.com/repos/JuliaLang/julia/issues/16770/comments","events_url":"https://api.github.com/repos/JuliaLang/julia/issues/16770/events","html_url":"https://github.com/JuliaLang/julia/issues/16770","id":158554446,"number":16770,"title":"Document preferred naming convention for getters/setters in style guide","user":{"login":"nalimilan","id":1120448,"avatar_url":"https://avatars.githubusercontent.com/u/1120448?v=3","gravatar_id":"","url":"https://api.github.com/users/nalimilan","html_url":"https://github.com/nalimilan","followers_url":"https://api.github.com/users/nalimilan/followers","following_url":"https://api.github.com/users/nalimilan/following{/other_user}","gists_url":"https://api.github.com/users/nalimilan/gists{/gist_id}","starred_url":"https://api.github.com/users/nalimilan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nalimilan/subscriptions","organizations_url":"https://api.github.com/users/nalimilan/orgs","repos_url":"https://api.github.com/users/nalimilan/repos","events_url":"https://api.github.com/users/nalimilan/events{/privacy}","received_events_url":"https://api.github.com/users/nalimilan/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaLang/julia/labels/doc","name":"doc","color":"02d7e1"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-06-05T13:29:25Z","updated_at":"2016-06-10T12:15:09Z","closed_at":null,"body":"I think it would be useful to add a recommendation regarding the naming of getters and setters to the style guide here: http://docs.julialang.org/en/latest/manual/style-guide/#use-naming-conventions-consistent-with-julia-s-base\r\n\r\nFor getters it looks like the rule is pretty clear: just use the name of the field, e.g. `names(x)`. For setters, I'm not sure we're clear on whether `names!(x)` or `setnames!(x)` is preferred. Cf. [this thread](https://groups.google.com/d/msg/julia-users/Y3m1IO74CI8/8ZfvAMSxAAAJ). Could we agree on a convention? If that's still undecided, probably better make a quick survey to choose the rule most commonly used in packages."},"comment":{"url":"https://api.github.com/repos/JuliaLang/julia/issues/comments/225166506","html_url":"https://github.com/JuliaLang/julia/issues/16770#issuecomment-225166506","issue_url":"https://api.github.com/repos/JuliaLang/julia/issues/16770","id":225166506,"user":{"login":"JeffreySarnoff","id":1682118,"avatar_url":"https://avatars.githubusercontent.com/u/1682118?v=3","gravatar_id":"","url":"https://api.github.com/users/JeffreySarnoff","html_url":"https://github.com/JeffreySarnoff","followers_url":"https://api.github.com/users/JeffreySarnoff/followers","following_url":"https://api.github.com/users/JeffreySarnoff/following{/other_user}","gists_url":"https://api.github.com/users/JeffreySarnoff/gists{/gist_id}","starred_url":"https://api.github.com/users/JeffreySarnoff/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JeffreySarnoff/subscriptions","organizations_url":"https://api.github.com/users/JeffreySarnoff/orgs","repos_url":"https://api.github.com/users/JeffreySarnoff/repos","events_url":"https://api.github.com/users/JeffreySarnoff/events{/privacy}","received_events_url":"https://api.github.com/users/JeffreySarnoff/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T12:15:09Z","updated_at":"2016-06-10T12:15:09Z","body":"As I recall, using `fieldname`(x) for the getter and `fieldname!`(x, newfieldvalue) for the setter were preferred for consistent simplicity once the decision to use change! to mean change-in-place was made."}}
{"actor":{"display_login":"JeffreySarnoff"}}