4 ms·
"Besides, you can’t change the regular expression language accepted by a program after it has been released, because that would break all the scripts that used
by nokya 11y ago
"Besides, you can’t change the regular expression language accepted by a program after it has been released, because that would break all the scripts that used the old language."
Lie. In my world, this is commonly referred to as an "option".
Many command-line programs have options that disable or enable some standard to perform their operations.
And guess what program does that? Grep.
Grep option switches allow the user to choose between basic, regular and Perl expression engines (-E -F -G -B options).
Breaking the existing scripts would have been caused by setting another regular expression by default in findstr, which is basically something that nobody would ask.
The real reason findstr is not improved is because Bob left the company and probably took the source code with him.
- 13of40 11y ago> The real reason findstr is not improved is because Bob left the company and probably took the source code with him. No that's not true. That would mean they were doing a special binary drop into Windows just for that one tool. That would be a major no-no, because it wouldn't be serviceable if there was, say, a security bug in it, or you had to localize it to a new language. The real reason it hasn't been updated is that if anyone ever suggested it, and it made it into milestone planning for that team, nobody felt passionate enough to argue it above the cut line. Besides, PowerShell was on the horizon, and it was going to fix everything.
- gjm11 11y ago> Lie. In my world, this is commonly referred to as an "option". It seems a bit unfair to call Chen a liar on this point since the very same paragraph you quoted from ends like this: "A change in the regular expression syntax would require a new switch to opt into the new behavior." (I do think it's pretty weird that he portrays this as a major problem. I suppose the point is that if you care about backwards compatibility your options aren't "crappy old RE syntax" and "nice new RE syntax", they're "crappy old RE syntax" and "crappy old RE syntax as default, and nice new RE syntax with an option" and that's not so appealing because (1) now maybe your program needs two regexp engines in it and (2) even a trivial inconvenience like remembering to add the option is something of a nuisance.)
- stinos 11y agoLie. In my world, this is commonly referred to as an "option". No lie, read the text again without reading between lines which arent't there anyway. He says you cannot just change the language used, he doesn't say one cannot add another one and use a switch to get it, which is what you are after. And which indeed is a good option.
- CaptSpify 11y ago> The real reason findstr is not improved is because Bob left the company and probably took the source code with him. I doubt that's the real cause. It's probably "good enough" and there's no real external push to change it. Likewise, modifying it would probably break existing programs, and nobody wants that on their shoulders.
- wtetzner 11y ago> The real reason findstr is not improved is because Bob left the company and probably took the source code with him. Did you actually read the article, or just skim it to find things to complain about? >When Bob gave the findstr project to the Resource Kit team, they got the source code, but there was no knowledge hand-off so that somebody on the Resource Kit team understood how the program worked, in case they needed to fix a bug or add a feature. Not that there was anybody on the Resource Kit team available to receive said knowledge. The Resource Kit was primarily a book, so the Resource Kit team consisted mostly of writers and editors, not programmers.