▲ | hamburglar 5 days ago | ||||||||||||||||||||||||||||||||||
> Basically, if you have a function takes a boolean in your API, just have two functions instead with descriptive names. Yeah right like I’m going to expand this function that takes 10 booleans into 1024 functions. I’m sticking with it. /s | |||||||||||||||||||||||||||||||||||
▲ | OrderlyTiamat 5 days ago | parent | next [-] | ||||||||||||||||||||||||||||||||||
If your function has a McCabe complexity higher than 1024, then boolean arguments are the least of your problems... | |||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||
▲ | Viliam1234 5 days ago | parent | prev [-] | ||||||||||||||||||||||||||||||||||
Hopefully you could refactor it automatically into 1024 functions and then find out that 1009 of them are never called in the project, so you can remove them. | |||||||||||||||||||||||||||||||||||
|