Skip to content

Function naming inconsistency #728

@Osspial

Description

@Osspial

Somewhat nitpicky, but there's an amount of inconsistency in our function naming schemes:

  • WindowBuilder::with_dimensions vs Window::set_inner_size
  • WindowBuilder::with_visibility vs Window::show/Window::hide
  • Window::get_position and Window::get_inner_position vs Window::get_outer_size and Window::get_inner_size (get_position should be get_outer_position)
  • Window::set_position (should be set_outer_position)
  • grab_cursor and hide_cursor vs all other state-setting functions (should be set_cursor_grab and set_cursor_visibility)
  • set_{min/max}_dimensions vs get_{whatever}_size (set_dimensions should be set_size)

Additionally, there's inconsistency in the word forms of the functions:

  • with_visibility vs with_maximized (visibility is a noun, while maximized is a past-tense verb. Could be maximization)
  • with_visibility vs with_resizable (resizable is an adjective. Could be resizability)

I don't feel too strongly about the word-form inconsistency since that's hard to get right and being consistent may force us to use uncommon forms of the words, but the other inconsistencies should be addressed. Being consistent will reduce the mental overhead of using the API and should reduce the amount of time users spend referring to the API docs to find which naming variation is used for each specific function.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions