Yup, I call that the Perlis-Thompson Principle -- because Ken Thompson made a similar combinatorial argument about software composition: you should design it around "one thing".
https://www.oilshell.org/blog/2021/07/blog-backlog-1.html#co...
Files had structure on pre-Unix OSes, but they don't on Unix, because it doesn't compose.
The "Uniform Interface Constraint" of REST is the same thing, and resembles a file system -- everything is GET / POST on URLs.
---
So the reason that shell/Unix and HTTP are so common is a MATHEMATICAL property of software growth.
How do you make a Zig program talk to a Mojo program? Probably with a byte stream.
What about a Clojure program and a Common Lisp program? Probably a byte stream. (Ironically, S-expressions have no commonly used "exterior" interchange format)
Every time a new language is introduced, I think "well there's another reason you're going to need a shell script".
---
The larger the system, the more heterogeneous it is. And software is larger now, which is why MORE GLUE is needed.
This is why shell was the #6 fastest growing language on Github in 2022: https://octoverse.github.com/2022/top-programming-languages
And the #1 fastest growing language is HCL, which is a very closely related form of glue. It's basically "shell for distributed systems"
---
https://www.oilshell.org/ has JSON as of a few months ago, and is now pure native code (no more Python)
All the normal shell stuff works:
osh$ ls */*.py | wc -l; whoami
327
andy
But you can seamlessly create dicts and lists like JavaScript. They are fully GC'd data structures:
osh$ var d = {name: 42}
And then you can write them as JSON:
osh$ json write (d)
{
"name": 42
}
And you can also upgrade to ysh with one line:
shopt --set ysh:upgrade
(YSH isn't stable yet, but OSH is very stable)
I think of the data languages as layered -- i.e. an entire json message literally is a string, and it can also contain strings:
https://www.oilshell.org/blog/2023/06/ysh-design.html#exteri...