Skip to content

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.

2 participants