What are the criteria for creating methods in the class?

Asked 2 years ago, Updated 2 years ago, 115 views

Is it better to write a method and function from the top and have an api function that has a lower stack as you go down?

Conversely, is it better to write an important api function first and put it at the bottom as the stack is higher and more peripheral?

Or should we write a peripheral, or associated, method that's just used for that API function right in between?

Or is there anything else better?

coding-style clean-code coding-convention

2022-09-22 13:35

2 Answers

I tend to write a peripheral method that is used only in the API function near the public function.


2022-09-22 13:35

It's more of a taste than efficiency.


2022-09-22 13:35

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.