ChrisPenner / ChrisPenner/rasa

Events vs. exported extension functions

Open
#69 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
625
Forks
39
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.