2 ms·
Something that is under-appreciated is that if you need to write your own command-line tool with a "proper" programming language such as C/C++ or whatever, then
by jiggawatts 2y ago
Something that is under-appreciated is that if you need to write your own command-line tool with a "proper" programming language such as C/C++ or whatever, then there is a vast difference in productivity between writing for traditional shells or PowerShell.
I've never been able to make a generally useful CLI tool in under a few thousand lines of messy code. You typically have to deal with: pipeline inputs, optional parameters, parameters with values, defaults with overrides, "dry run" mode, and the various output formatting requirements, and so on. You end up with 90% fluff and 10% action.
With PowerShell, a C# module is basically 20 lines or so of overhead, and the rest is all action. It's mindblowing how productive this is! You get parameter validation, parameter name tab-complete, pipeline input, pipeline output, formatting, strong typing, globbing, etc... all for free.
- theimposter 2y agoWhile I've never used C#, I agree with you. I've moved more and more to compiled or interpreted languages versus CLI tools for maintenance and administration.