{"action":"created","issue":{"url":"https://api.github.com/repos/gfx-rs/gfx/issues/1833","repository_url":"https://api.github.com/repos/gfx-rs/gfx","labels_url":"https://api.github.com/repos/gfx-rs/gfx/issues/1833/labels{/name}","comments_url":"https://api.github.com/repos/gfx-rs/gfx/issues/1833/comments","events_url":"https://api.github.com/repos/gfx-rs/gfx/issues/1833/events","html_url":"https://github.com/gfx-rs/gfx/issues/1833","id":298110036,"number":1833,"title":"[API Design] [II] C-GETTER: Getter names should follow Rust conventions","user":{"login":"mjadczak","id":3052620,"avatar_url":"https://avatars1.githubusercontent.com/u/3052620?v=4","gravatar_id":"","url":"https://api.github.com/users/mjadczak","html_url":"https://github.com/mjadczak","followers_url":"https://api.github.com/users/mjadczak/followers","following_url":"https://api.github.com/users/mjadczak/following{/other_user}","gists_url":"https://api.github.com/users/mjadczak/gists{/gist_id}","starred_url":"https://api.github.com/users/mjadczak/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjadczak/subscriptions","organizations_url":"https://api.github.com/users/mjadczak/orgs","repos_url":"https://api.github.com/users/mjadczak/repos","events_url":"https://api.github.com/users/mjadczak/events{/privacy}","received_events_url":"https://api.github.com/users/mjadczak/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-02-18T19:19:12Z","updated_at":"2018-02-19T12:59:39Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"See #1254.\r\n\r\nThese should all drop their `get_` prefix to comply with Rust conventions:\r\n- `gfx_backend_dx11::device::Device.get_shader_model`\r\n- `gfx_hal::adapter::PhysicalDevice`\r\n  - `get_features`\r\n  - `get_limits`\r\n- `gfx_hal::device::Device`\r\n  - `get_buffer_requirements`\r\n  - `get_image_requirements`\r\n  - `get_fence_status`\r\n- `gfx_hal::image::AaMode.get_num_fragments`\r\n- `gfx_hal::image::Kind`\r\n  - `get_dimensions`\r\n  - `get_level_dimensions`\r\n  - `get_num_levels`\r\n  - `get_num_slices`\r\n  - `get_num_layers`\r\n- `gfx_hal::window::Surface.get_kind`\r\n\r\nSome of these might not be true \"getters\" in that they have to do some sort of computation. In that case the name without `get_` would still fit, or perhaps a name like `calculate_*` should be used.\r\n\r\nThese should be discussed, and perhaps changed to something more descriptive. According to the checklist, `get` should only be used as a name when \"there is a single and obvious thing that could reasonably be gotten by a getter\".\r\n- `gfx_backend_dx11::command::DataBuffer.get`\r\n- `gfx_backend_gl::queue::CommandQueue.get` and `get_raw`\r\n"},"comment":{"url":"https://api.github.com/repos/gfx-rs/gfx/issues/comments/366686465","html_url":"https://github.com/gfx-rs/gfx/issues/1833#issuecomment-366686465","issue_url":"https://api.github.com/repos/gfx-rs/gfx/issues/1833","id":366686465,"user":{"login":"kvark","id":107301,"avatar_url":"https://avatars1.githubusercontent.com/u/107301?v=4","gravatar_id":"","url":"https://api.github.com/users/kvark","html_url":"https://github.com/kvark","followers_url":"https://api.github.com/users/kvark/followers","following_url":"https://api.github.com/users/kvark/following{/other_user}","gists_url":"https://api.github.com/users/kvark/gists{/gist_id}","starred_url":"https://api.github.com/users/kvark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kvark/subscriptions","organizations_url":"https://api.github.com/users/kvark/orgs","repos_url":"https://api.github.com/users/kvark/repos","events_url":"https://api.github.com/users/kvark/events{/privacy}","received_events_url":"https://api.github.com/users/kvark/received_events","type":"User","site_admin":false},"created_at":"2018-02-19T12:59:39Z","updated_at":"2018-02-19T12:59:39Z","author_association":"OWNER","body":"Yes, those. I think it's fine to leave them as get_xxx.\n\n> On Feb 19, 2018, at 07:28, Matt Jadczak <notifications@github.com> wrote:\n> \n> Are you talking about the three functions in gfx_hal::device::Device? I'm not sure what the convention is on functions which are not pure getters—we could stick with get or we could go to something like obtain or calc.\n> \n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub, or mute the thread.\n> \n"}}
{"actor":{"display_login":"kvark"}}