I know a few "Use the source, Luke" people who will rage at that.
I know a few "Use the source, Luke" people who will rage at that.
- I can add to my own code, even if it's years old, without re-reading every line every of every method I need
- I can contribute to a code-base built by multiple people without reading every line they've written
Shell scripts are almost the complete opposite end of the spectrum:
Shell script functions are usually only created as a last resort.
Global side effects (creating temporary files, changing global system state, global variables, etc.) are what shell scripts are all about.
There are rare snippets of shell scripting that are different, using local variables and doing some sort of calculation, but that is the exception, not the rule.
While ideally comments would be prolific, poetic, and perfect, some commenting is always better than none and most developers have bad habits of not commenting their code, so pushing them gently in the direction of more, not less, usually works.
Hence why they'd prefer you write Python, not shell.
I would rather put that the comments should be succinct rather being prolific. Better to put some explanation on tricky parts of the code as comments, and have method/function/class behavior as javadoc, pod, pydoc etc.