Which is better, using multiple overlapping functions or using them one by one?

Asked 2 years ago, Updated 2 years ago, 87 views

id = camelCase(toParse( upper(id) ));

Is this better?

id = upper(id); id = toParse(id); id = camelCase(id);

Is this better? I only did three right now.

On the premise that the overlap can increase further and that there is no particular problem to change the variable name.

coding-style clean-code coding-convention

2022-09-22 21:42

1 Answers

Usually, these issues should be focused on readability, but the questions you asked are likely to contain a lot of subjective opinions.

In my case, I use it based on the following judgment.

If you like the first one

If the second is good

My thoughts are as above. If you're developing it together, it's good that you can decide in a way that everyone can agree on.


2022-09-22 21:42

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.