4 ms·
This is also good for maintainability. Say you need to upgrade the algorithm but keep the old version around. You can create a new version of the algorithm spec
by withinboredom 5y ago
This is also good for maintainability. Say you need to upgrade the algorithm but keep the old version around. You can create a new version of the algorithm specific parts without changing the public implementation and allow users to select which version to use; eventually changing the default. In a single class, this would be a nightmare.
- iainmerrick 5y ago"Nightmare" is a bit strong; that seems like a very normal and straightforward refactoring step... iff you avoided putting the low-level stuff into your public API.
- withinboredom 5y agoI’ve mostly see people do public_namespace.private_internal.MyClass so you can use it if you really want to… but you probably shouldn’t.