3 ms·
Good questions. It's clear from this comment thread that I need to explain Oil better on the blog (which I mentioned in the conclusion), but I'll respond here
by chubot 9y ago
Good questions. It's clear from this comment thread that I need to explain Oil better on the blog (which I mentioned in the conclusion), but I'll respond here briefly.
I somewhat agree with your spectrum of strictness, but the other dimension is "how suited is this language for shell-like problems?".
C++ is strict, but obviously not good for writing "shell scripts" in.
Oil will be somewhere around Python in terms of strictness, but at least as suitable as bash for shell-like problems (of course). The goal is for it to be more suitable, but I haven't gotten there yet.
As far as what it offers, that is scattered over the blog, but this tag might give an idea:
http://www.oilshell.org/blog/tags.html?tag=oil-language#oil-language http://www.oilshell.org/blog/tags.html?tag=oil-language#oil-...
As a concrete example, Oil will be based more around arrays of strings than flat strings. The "Thirteen Awkward Ways..." post hints at that. FWIW, the Ion shell, part of Redox OS, was influenced by this way of thinking.
Also, I need to write a blog post entitled "Python Is Not an Acceptable Shell". There was a nice blog post that translated shell to Python that inadvertently proved this point.
I'll keep your questions in mind when writing future posts explaining the project.
- detuur 9y agoIf you're going to solve the problem of shell scripting, one particular itch that I have is that shell scripts, or at least the sufficiently complex ones, are often strongly dependent on availability of local executables, sometimes even specific implementations or versions. I had a shell script on my desktop that would automagically extract any archive I threw at it. Nice. So when I was working on android through a shell, I wanted the same convenience and so I scp'd the script onto my phone. It wouldn't run. Only worked with GNU tar, as opposed to any other tar, like bsd tar or busybox's. Having a language that provides system-independent abstractions of ls, tar, top, or the other way, that clearly indicates upon which binaries it depends, would greatly improve script usability. It'd be nice if running an oil script would automatically warn me that I need GNU tar >= version x.xx.