Skip to content

Events vs. exported extension functions #69

@jameshaydon

Description

@jameshaydon

I have a question about the design of the extension system. Let me just take an example:

The vim extension will call addBottomStatus, which makes it depend on a particular way the views extension works. Furthermore, it means that the vim extension won't interact with some other "status-like" extension the user might have enabled.

Would it not be better for the vim extension to emit an event instead?

I realize that in this particular instance it might have just been a shortcut, the more general question is: when should an extension expose an action rather than listening for events?

Followup question: moving over to events would only partially solve the problem since the event's type would still be defined in the views extension. So I suppose we would also need extensions whose sole purpose is to provide canonical event types for other extensions to use?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions