4 ms·
>In cases like this, I still use a top-level free function, but it just instantiates a (private) class and invokes those (private) subfunctions itself That's a
by kgeist 4y ago
>In cases like this, I still use a top-level free function, but it just instantiates a (private) class and invokes those (private) subfunctions itself
That's a good approach I follow myself, too. The fact that I decided to use a class to manage complexity is an implementation detail; callers should not be aware of it. I don't think there's an opposition "free functions vs. classes", they complement each other.