Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Couldn't disagree more.

Any code that you expect others (or yourself) to maintain in the future does not belong in a shell script.

Why? A shell script is often the best tool for the job. If your reason is that shell scripts aren't maintainable, then this is a circular argument basically amounting to "we shouldn't make shell scripts maintainable because we shouldn't ever maintain shell scripts because shell scripts aren't maintainable".

allowing experienced users to accomplish their goals as quickly as possible

Having both short and long versions of each flag seems to give you the best of both worlds.



I agree that ideally shell scripts should be maintainable, and that designs which allow both succinctness and maintainability – like supporting both short and long flags – are preferable. But there will always be cases where you have to choose between the two, and in those cases I think a shell should choose succinctness. For all of the Unix shell’s weaknesses as a programming language, it’s an incredibly powerful tool for interactive programming, writing one-liners at the shell prompt. And when you’re trying to program as close as possible to the speed of thought, every keystroke counts.


And when you’re trying to program as close as possible to the speed of thought, every keystroke counts.

And when is that ever important? I've been in development and sre roles for decades, and I've never been in a situation where I have to program at the speed of thought.

The only time I've seen milliseconds matter is watching movie depictions of hackers.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: