(a) Subshell is shell {}. MISUSE! I have seen this in 4-5 different projects. It seems that subshells are misused as often as they are used correctly!
Where did I note this?
EVERY INSTANCE OF $(( Is s MISUSE OF SUBSHELL.
SYNTAX MATTERS.
About FIFTY PERCENT OF SUBSHELLS SHOULD BE COMMAND GROUPS!
http://www.oilshell.org/blog/2016/11/18.html
TODO: Point to 99 fizzbuzz in Bash.
do { } vs subshell {}
(a) case vs matchstr. matchstr vs. match -- because oil will have types.
(a) source vs . -- we want verbose functions. Rely on auto-completion.
(b) GLOBAL variables. Need to work this out a l ittle more
(c) File descriptors. !2.
< and > are UNARY PREFIX as well as binary operators.
TODO: BLOG POST: Redirects are not binary operators.
(a) $ifsjoin()
ANOTHER BAD SUBSHELL.
Main correct use of subshells: ( cd ~/git ; find . ; cd ~/hg )
Oil will have:
cd ~/git { find . }
Make note of:
case
@Argv splicing
no quotes around matchstr $1
TODO: "source" instead of . - proper modules might be encouraged, make the code faster
$() and `` -> $[]
:= for mutation