关于向后兼容性的一则轶事
An anecdote about backward compatibility

原始链接: https://blog.plover.com/2026/01/26/#wrterm

这个轶事突显了与遗留系统合作的令人沮丧的现实,以及向后兼容性的令人惊讶的怪癖。作者的任务是在IBM System 370的黑白调试器中添加颜色,于是开始寻找相关的文档——在一堆文档中找到一本实体文件夹。 搜索揭示了一种囤积信息的职场文化(特别是同事马修对手册的保护态度),这种文化源于害怕成为找不到所需资源的人。最终,文档被找到,显示`WRTERM`宏*确实*支持颜色,但只有黑色(默认)或红色——而且仅当终端配备了罕见的“双色带”时。 这个故事说明,看似简单的改进可能会受到几十年来的设计选择和早期计算硬件的限制,同时还要应对在互联网时代之前获取信息的实际挑战。

这次黑客新闻的讨论集中在计算领域令人惊讶且常常令人沮丧的**向后兼容性**影响。一个链接中的轶事(plover.com)引发了关于为支持*旧*技术而做出的决策如何持续影响现代系统。 用户分享了例子:Fortran 77 的六个字母函数名限制(为了支持古老的编译器)至今仍在 NumPy 等库中回响,而 Windows 使用“CR LF”作为换行符源于打字机机制。IBM 大型机因运行着数十年历史的代码而受到赞扬,而 Windows 也承载着遗留负担——一些对话框自 Windows 3.1 以来就没有更新过,以避免破坏功能。 核心观点是,看似武断的、出于历史原因做出的选择可能会变得根深蒂固,从而在当前软件和硬件中产生怪癖和限制。虽然令人沮丧,但这种对向后兼容性的承诺确保了关键系统的持续功能。
相关文章

原文

An anecdote about backward compatibility

A long time ago I worked on a debugger program that our company used to debug software that it sold that ran on IBM System 370. We had IBM 3270 CRT terminals that could display (I think) eight colors (if you count black), but the debugger display was only in black and white. I thought I might be able to make it a little more usable by highlighting important items in color.

I knew that the debugger used a macro called WRTERM to write text to the terminal, and I thought maybe the description of this macro in the manual might provide some hint about how to write colored text.

In those days, that office didn't have online manuals, instead we had shelf after shelf of yellow looseleaf binders. Finding the binder you wanted was an adventure. More than once I went to my boss to say I couldn't proceed without the REXX language reference or whatever. Sometimes he would just shrug. Other times he might say something like “Maybe Matthew knows where that is.”

I would go ask Matthew about it. Probably he would just shrug. But if he didn't, he would look at me suspiciously, pull the manual from under a pile of papers on his desk, and wave it at me threateningly. “You're going to bring this back to me, right?”

See, because if Matthew didn't hide it in his desk, he might become the person who couldn't find it when he needed it.

Matthew could have photocopied it and stuck his copy in a new binder, but why do that when burying it on his desk was so much easier?

For years afterward I carried around my own photocopy of the REXX language reference, not because I still needed it, but because it had cost me so much trouble and toil to get it. To this day I remember its horrible IBM name: SC24-5239 Virtual Machine / System Product System Product Interpreter Reference. That's right, "System Product" was in there twice. It was the System Product Interpreter for the System Product, you see.

Anyway, I'm digressing. I did eventually find a copy of the IBM Assembler Product Macro Reference Document or whatever it was called, and looked up WRTERM and to my delight it took an optional parameter named COLOR. Jackpot!

My glee turned to puzzlement. If omitted, the default value for COLOR was BLACK.

Black? Not white? I read further.

And I learned that the only other permitted value was RED, and only if your terminal had a “two-color ribbon”.

An old-style typewriter ribbon, a long, narrow piece of cloth
impregnated with ink and wound onto two spools.  On this one, the top
half of the strip is black and the bottom half is red.

[Other articles in category /prog] permanent link


联系我们 contact @ memedata.com