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

[app] no need for run to be static; use constructor. #376

Merged
merged 1 commit into from
Nov 12, 2021

Conversation

truthbk
Copy link
Member

@truthbk truthbk commented Nov 9, 2021

This is a nasty pattern. Instantiating an instance to the app in a static method straight up feels wrong. Promoting a pattern where the caller might not even get a copy to the app object in case there's a need to interact with it feels wrong.

I'd rather have the caller instantiate and then launch the run routine explicitly.

There's room for a bigger refactor, but this PR should suffice to get rid of the anti-pattern.

Copy link
Contributor

@sgnn7 sgnn7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@devinsba devinsba left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense from the agent point of view.

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.

3 participants