

- iRi
source link: http://www.jerf.org/iri/post/2959
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

- iRi
posted Jul 19, 2021
in Programming
I've said a few times on Hacker News over the years that I don't think you can have a single shell language that covers the interactive and programmatic use cases, but I have not yet talked through it enough to myself to crystallize the point.
I think I have it now.
Interactive shell usage is optimized for the fact that a human will be examining the state of the world after every shell command. Programmatic shell usage is optimized for the fact that computer will be examining the state of the world after every shell command. I contend that the gulf between these two use cases, and the type and degree of intelligence being brought to bear by the two parties, is too large to be optimally covered by one language.
A language must either privilege interactive use over programmatic use, in which case you get existing shell languages whose affordances run actively counter to what is needed to make it safe to run with a computer as the responsible party, or it must privilege the sorts of things that make it easy to trust a computer driving, at the cost of making it too tedious for real-time usage.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK