by dexen · 6y ago · 0 comments
Partly, but less so.
Human language vocabularies approximate Huffman Coding - the more frequently used words (and phrases) tend to be proportionally shorter. This is a gradual process for spoken languages, and somewhat quantized for written languages.[1] It's possible because with human languages, "close" is "good enough"; one can read english written with ye olde orthography, if with a bit of extra effort.
Less so in the lifespans of particular programming languages. Per Postel's law we tend to be liberal with extending but conservative with breaking backward compatibility. I think the case of command line tool parameters is particularly conservative for various reasons; among them because the 'knowledge' of options is spread among multitude of separate project - many of them obscure and bespoke - and coordination would be nigh impossible.
However there are some signs of similar trends; note how the "function" and "integer" and similar keywords of older languages tend to turn into "fn" and "int" in newer languages.
--
[1] Not sure if there's a comparable process for grammars, but I guess it's a fair bet...?
Pejoration happens too. When is the last time you used a GOTO in code? And yet, 40 years ago, you couldn't write a BASIC program without one. And the revulsion against NULL causing a shift to Maybes and optional types to the point where the concept is reified in many languages now?
All I'm saying is that there are multiple mechanisms that are changing the languages we write code with, and that it is changing far faster than people realize.
Just yesterday in fact, while implementing a state machine. Except the developers of that particular language explicitly did away with GOTO, so I ended up approximating it with a SWITCH/CASE. At least the language supports fall-through...
Which is to say, people differ in judgements of various features (footguns vs swiss army knifes). Moreover, the judgements seem to oscillate as fashions, in ~10 year long cycles. Please recall how exceptions and templates used to be a hot thing back in the day. Ditto garbage collectors. Presently we're all in love with Rust, and the "JITs considered harmful" paper will drop any day now.
So why does `ls` have a recursion flag? Why does `cp` have a recursion flag? Why does `chmod` have a recursion flag? Why does `chown` have a recursion flag? Why isn’t recursion its own command, that takes as argument the command to apply at each level?
Ditto untyped, untagged streams, which mean every tool implements its own custom UI behavior when attached to a terminal, instead of outputting tagged data and letting the consumer run it through system-standard data formatters.
This is not good—or even borderline competent—systems design. This is bullshit. Because the people who slapped it all together are bums, and the people who accepted it didn’t care enough to call them on it.
But noooo, we can’t change anything now; because “backwards compatibility”.
Protip: when you build a system that can’t evolve, that grinds to a halt under its own impossible weight, it’s time to confess “yeah, we totally ballsed that one up” and start over again, lessons learnt. Because maintaining that status quo is a tyranny: dragging everyone else down to the level of its incompetence, and beating them to death with intransigence. No prizes for guessing who that benefits: the bums who built it. And who pays for it: everyone else.
It’s a scam. Perpetrated by and for those who cannot admit they are wrong.
Smash it down. Because whatever comes after it should be so much better, the only question will be “Why the frell did we wait so long?”
--
“Those who make peaceful revolution impossible will make violent revolution inevitable.”—John F Kennedy
Why did ls even need 11 parameters to begin with? Why not exactly 1? Or none? Why did tar need 12? Why did find need 14? The 28 tools in the example (excluding non-existing ones) had an average of ~3 parameters per tool in '79. Should 2017 have brought us 200 extra individual tools to provide the same additional functionality? You want another tool that does recursion for ls to save us from "incompetent bums" and "grinding to a halt"?
Everything around you grew in complexity to adapt to your needs because there's value in consolidation. It's why you are now typing from a device that is orders of magnitude more complex and integrated than the one used to write down the Unix philosophy.
You ask the question "why" but fail to answer the "why not". Why would a tool that still does exactly what it used to do in the past not be able to also do more especially when it's still within its sphere of relevance? And not the "out of principle" answer, not the handwaivy, tin foil hat answer, not the offensive and insulting answer that you provided above (bums? incompetent? bullshit? scam?).
Times change and philosophies adapt to remain relevant. "We must use time as a tool, not as a couch" - JFK.
It's interesting to think about how things can be swapped dynamically in this system. Consider the evolution of 'telephone.' In the 1980's, 'phone' referred to a land-line telephone. In the 2000's, it was ambiguous; for young people, it meant 'cell phone' most likely, or we started calling them 'house phones' for land lines. Now 'phone' is mostly used for a 'smart cellular telephone'.
Another interesting example is "Playstation". That always refers to the current generation, and we retroactively apply "PS1."
It will be an interesting period for history in the future to try and decode our present-day meanings since so many words are period specific.
You could probably trace a similar evolution across programming languages, just by systematizing the phrases/words used in each to accomplish the same thing.