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

Rename the "component setup" term to "component usage" #83

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

dpikhulya
Copy link
Contributor

@dpikhulya dpikhulya commented Dec 4, 2024

This (so far draft) PR considers the idea of renaming the "component setup" term (which is used for naming a hierarchy of classes, which are used as compont class's companion objects) into the "component usage" term.

The reasoning behind this renaming proposition:

  • The term "setup" can feel misleading in some aspects. While we imply "setup" to be a synonym (or a metaphor) for "embedding an instance of component into the composition":

    • First, it doesn't feel to match the notion of "embedding an instance" nicely: it's not a general term encompasses the notion of "embedding an instance" as one of its variants, but the one that pretends to be specific and, being that, still feels to be somewhat off.

    • There can be more scenarios than "embedding an instance" (e.g. MessageForm also provides an extra create function for creating a form's instance), or even some components that don't include the "embedding an instance" scenario at all (e.g. ConfirmationDialog is currently just used imperatively, and its companion object contains the respective ask function for that purpose).

      Thus the "setup" metaphor doesn't match the entire variety of usage scenarios in general.

  • The term "usage" on the other hand:

    • Still as concise so the names are equally compact.

    • Represents a general term that reflects the idea that this object introduces a way of how a component's class can actually be used (an entry point to using the component).

      It also appears to suit both usage scenarios: when components need to be used by declaring their instance, and when they need to be used with some imperative API (e.g. like create for forms, or the open and ask APIs of various dialog components).

@dpikhulya dpikhulya self-assigned this Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant