(author here) Your first and third paragraph seem to be in conflict? I have heard the feedback that an interactive shell and a programming language should be different, which I disagree with.
(For one, shell is already used as a programming language, so the ship has sailed. Also I use shell in the Lisp tradition: build your program up with a REPL.)
But yes Oil is designed to "give the best of both worlds" as you say in the third paragraph.
This recent post will probably give you the best idea of it:
echo $mystr # silently splits
echo "mystr" # no split
In Oil, it's:
echo $mystr # no split by default
echo @split(mystr) # opt in explicitly
This is enabled with options so existing shell scripts work. Also @split isn't really idiomatic since you would likely use arrays, but it could be useful for porting.
I've also thought of adding a more explicit alternative for glob, but I actually like the shorter syntax here:
echo *.py
echo @glob('*.py') # not implemented but is consistent
But I'm probably going to implement this safety feature
Still, echo is not good for these examples as for it the split doesn't matter and can't be detected, whereas for other commands (or even calls of functions) it indeed can matter.
This example, I think, illustrates the differences between quoted and unquoted use of $name (as present in the current shells) better (to those who aren't familiar with the nuances of shells):
(For one, shell is already used as a programming language, so the ship has sailed. Also I use shell in the Lisp tradition: build your program up with a REPL.)
But yes Oil is designed to "give the best of both worlds" as you say in the third paragraph.
This recent post will probably give you the best idea of it:
http://www.oilshell.org/blog/2020/01/simplest-explanation.ht...
Rather than
In Oil, it's: This is enabled with options so existing shell scripts work. Also @split isn't really idiomatic since you would likely use arrays, but it could be useful for porting.I've also thought of adding a more explicit alternative for glob, but I actually like the shorter syntax here:
But I'm probably going to implement this safety featurehttps://github.com/oilshell/oil/issues/552
to solve the well known issue where files that look like flags can confuse code and data. e.g. 'rm *' with a file named '-rf'.