4 ms·
If your script is over 80-120 lines, it's time for modularization. No sane person writes 1000 line scripts, and the fact that the Oil author uses such a scenari
by kakarot 9y ago
If your script is over 80-120 lines, it's time for modularization. No sane person writes 1000 line scripts, and the fact that the Oil author uses such a scenario as a reason to use their shell is very disconcerting about the quality of code and I wouldn't touch Oil with a ten-foot pole.
- kelnos 9y agoIf that's the case, then there are a lot of insane people out there. I sympathize with your opinion on how things should be (though I may or may not agree), but at the end of the day we need to look at what the reality of the world is, not on the ideal way we think people should be using the tools we already have.
- kakarot 9y agoWell to be fair, there are a lot of insane people out there. :-)
- arghwhat 9y agoJust because writing 1000+ line bash scripts is something that happens doesn't mean it is something one should not avoid. People also implement new SQL injection bugs every day—just because a lot of people do it doesn't mean we should just let it slide.
- chubot 9y agoPlease read the FAQ: http://www.oilshell.org/blog/2018/01/28.html#toc_7 http://www.oilshell.org/blog/2018/01/28.html#toc_7 I didn't write those scripts, and you rely on them, whether you know it or not. Do you use Unix? Do you use the cloud? You rely on them. See: https://www.reddit.com/r/linux/comments/7lsajn/oil_shell_03_release/dromj6n/ https://www.reddit.com/r/linux/comments/7lsajn/oil_shell_03_... Also, shell has functions.
- kakarot 9y agoI see. My apologies for being so critical. I agree that POSIX is incomplete and out of date. However I do think it is a disaster that people can't break up their shell code into more modular components, and there is no excuse for it. And I especially do not wish to discourage you from trying to reinvent shell, because someone has to do it, but at minimum I don't see myself moving away from my shell for the better part of a decade. Hopefully at that point Oil's community has matured to the point where I feel comfortable trusting it to be stable and free of any critical privilege escalation bugs. Good luck!