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

Minimark API #120

Open
vikiival opened this issue Apr 4, 2023 · 0 comments
Open

Minimark API #120

vikiival opened this issue Apr 4, 2023 · 0 comments
Labels

Comments

@vikiival
Copy link
Member

vikiival commented Apr 4, 2023

Since #91 was merged I would like to do a followup about package API

Anything that has more than 3 params should be rewritten to Parameter Object.

I've never seen a guideline, but in my experience a function that takes more than three or four parameters indicates one of two problems:

The function is doing too much. It should be split into several smaller functions, each which have a smaller parameter set.

There is another object hiding in there. You may need to create another object or data structure that includes these parameters. See this article on the Parameter Object pattern for more information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant