Skip to content

Don't mixin MatrixBaseApis into MatrixClient #268

Open
@kegsay

Description

@kegsay

I assume this was done to preserve backwards compat whilst transitioning the HTTP APIs, but there is no visible TODO/XXX/FIXME to say that using the mixin is bad.

It's bad because:

  • It's now in the JSDocs, so developers need to look in 2 places to find a function on MatrixClient (the base API class and the client class).
  • There seems to be no thought to what happens if both classes specify the same function name. No warnings. No thrown errors. Nothing. This would be a pain to debug.
  • It encourages tight coupling between the 2 classes. Nothing stops MatrixBaseApis from calling functions defined on MatrixClient and then breaking horribly when people try to use MatrixBaseApis stand-alone.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions