▲ | crazygringo 5 days ago | ||||||||||||||||
Not really. Tons of well-written functions have many more potential code paths than that. And they're easy to reason about because the parameters don't interact much. Just think of plotting libraries with a ton of optional parameters for showing/hiding axes, ticks, labels, gridlines, legend, etc. | |||||||||||||||||
▲ | atoav 5 days ago | parent [-] | ||||||||||||||||
Yes but this is about the difference between:
and:
The latter is how you should use such a function if you can't change it (and if your language allows it).If this was my function I would probably make the parameters atrributes of an TurboEncabulator class and add some setter methods that can be chained, e.g. Rust-style:
| |||||||||||||||||
|