3 ms·
That bothered me at first, but thinking about it more, I actually don't mind it in such a small project for one reason: I'd expected that at least 95% of first-
by franga2000 8y ago
That bothered me at first, but thinking about it more, I actually don't mind it in such a small project for one reason:
I'd expected that at least 95% of first-year programming students could jump in and add support for a new package manager without any trouble.
By contrast, none of the students in my 3rd-year Java class could do the same in a version implemented with polymorphism.
This is the perfect project to get new programmers excited about contributing to open source.
The one change I would suggest is putting the package manager names as constants all in one place. That way, you can't make a typo in one of the checks in the if statements.
That, and maybe replacing the if-else chain with a switch statement. Might help remove some duplication