4 ms·
Some context: egrep and fgrap are implemented as wrapper scripts that look like this: #!/bin/sh exec grep -E "$@" 28 bytes. Now consider the cost/ben
by kentonv 4y ago
Some context: egrep and fgrap are implemented as wrapper scripts that look like this:
#!/bin/sh
exec grep -E "$@"
28 bytes.
Now consider the cost/benefit between two options:
1. Maintain these wrapper scripts forever.
2. Update all scripts in the world that use these to use the flags instead, eventually removing the wrappers.
What is the cost of option 1? It's essentially zero. No changes means no engineering work. Some hard drive space is wasted, but TBH you can probably buy a single hard drive with enough capacity to store all copies of these files that will ever exist. Perhaps some people's sense of cleanliness will be offended by the continued existence of non-standard commands but it's hard to demonstrate any actual cost from that.
What is the cost of option 2? Many thousands of hours of engineering labor, just to update scripts. But that's just the beginning: There will likely be production outages when the script are finally removed, since inevitably some uses will be missed. That will cost money. It will also lead to a general increase in fear of software updates, leading even more people to run outdated installations that are vulnerable to security flaws. Security breaches will cost more money.
It seems clear this change will cost millions of dollars, whereas keeping things as they were would have trivial cost. Therefore, this change should not have been made, and should be reverted.
Reasoning like this is why widely-used platforms simply never remove "deprecated" APIs:
* Java still contains APIs deprecated 25 years ago in version 1.1.
* Linux's ABI is famously stable, with Linus verbally abusing anyone who even suggests a backwards-incompatible change. (I don't approve of the abuse part.)
* The web platform is backwards-compatible even with objectively bad JavaScript design decisions made by Netscape in the 90's.
* C libraries still include `gets()` even though any use of it implies a security vulnerability. (Though we hope any remaining users are not running in security-sensitive use cases...)
* The Windows API is full of trash but you can still run executables built in the 90's.
"Deprecated" was never supposed to mean "will go away". It was always supposed to mean only "there's a better way to do this".
- jeroenhd 4y agoIf the GNU folks want to remove the wrapper scripts, they can. It's their software and they write the best practices for it. Distro maintainers can still ship these scripts. They can add aliases to the user profile to do the same thing without having to launch a sh instance. Maybe they'll add a second package, grep-utils, that just contains the wrapper scripts so you can choose between GNU's position and the "I don't like change" position. Microsoft has deprecated and removed tons of stuff and so did browsers. Vista crashed so often because Microsoft did away with their entire driver model and vendors wrote quick wrappers around their old, crappy drivers and shipped those. Many remaining browser features are reasons why web development sucks so much ("quirks mode" for one) and Java not breaking compatibility has given it many problems that dotnet solved by breaking compat once. Java also has removed several deprecated packages and moved them to libraries instead (like Nashorn). Deprecated means "if we see a reason to remove this, we may remove this in the future". It's no guarantee for removal but it's no guarantee for being kept around either.
- kentonv 4y ago> If the GNU folks want to remove the wrapper scripts, they can. It's their software and they write the best practices for it. I'm not making any argument about the maintainer's rights. I am making an argument about whether it was a good technical decision. > [people can work around it] That doesn't make it a good idea, though. > Microsoft has deprecated and removed tons of stuff and so did browsers. Only when there was a real benefit deemed greater than the cost. In this case there is essentially no benefit whatsoever to the change, except some abstract notion of cleanliness or pedantic spec compliance.