3 ms·
I'm curious as to what you mean by simpler code? Commander leads to incredibly simple code (as it just sets a list of options) combined with helpful CLI help o
by abritinthebay 8y ago
I'm curious as to what you mean by simpler code?
Commander leads to incredibly simple code (as it just sets a list of options) combined with helpful CLI help output.
- jessaustin 8y agoSome of the meaning of the code is embedded in how commander is set up, which if one is unfamiliar with it means the code is less explicit. Explicit is good, and there is a sense in which explicitness leads to simplicity.
- navd 8y agoExactly, it’s a lot clearer to your future self, and any other maintainers how the application works when you aren’t adhering to a “frameworks” way of doing something. Especially for a simple cli. Abstractions can be good, but I feel as though something like commander is really just an unneccessary abstraction. I’ll take simplicity first anyday.
- abritinthebay 8y agoIt’s extren explicit...? Each option is laid out clearly. Each option Maps to a key on the object that is passed to the function called at the end of a commander chain. It would be hard to be more explicit