3 ms·
Wow, there are 7 ways this can easily fail, and the script might not even notice. How do you write in a normal language? With roughly 3 times the amount of key
by jstimpfle 7y ago
Wow, there are 7 ways this can easily fail, and the script might not even notice.
How do you write in a normal language? With roughly 3 times the amount of keystrokes, but in a much more robust way. And if something fails, you will actually get a Python exception.
- enriquto 7y agoIf I understand correctly, the whole point of Oil is to make a shell in which this kind of code is perfectly correct and robust.
- chubot 7y agoYes exactly, see my sibling response. This is a perfect use case for the "xargs $0 dispatch" pattern I mentioned, and maybe I will use it in that blog post. Your example does have some quoting problems which is understandable / common, but in Oil the obvious way should be the right way. That's not true in shell! https://news.ycombinator.com/item?id=22161847 https://news.ycombinator.com/item?id=22161847 Thanks again for the encouragement!