微软 Visual Basic 之兴衰
Visual Basic VB
![](/data/attachment/album/202312/26/155918bqxx5bbcbqbbpqwp.jpg)


根据 Retool 的设计总监 Ryan Lucas 所写的新 [历史文章](https://retool.com/visual-basic)，开发微软的 Visual Basic（VB）的 Alan Cooper 最初将其设想为一个“外壳构造工具包”。那是在 1987 年，当时 Windows 正在赢得越来越多的用户，但为这个操作系统编写应用却困难重重。它的原型被命名为 Tripod，能够将按钮和列表框这样的对象拖放到设计界面上。


Lucas 的文章提到，随着时间的推移，这些设计对象的命名从 “waldos” 变到 “gizmos”，又改为“controls”。


当这个项目被微软 CEO 比尔·盖茨评审时，他决定将其与即将发布的 Windows 3.0 捆绑出售。然而这未能实现，原因不太清楚，可能是对于 OS/2 的政策争论（据说 OS/2 有望取代 Windows），或者是与开发 Windows 的团队产生的冲突。


实际上，这个当时开发代号被称为 Thunder 的项目，变成了一个商业语言项目，并在 1991 年作为 BASIC 的一个版本发布。文章里记载：“最终产品让 Cooper 感到震惊，因为他非常厌恶 BASIC。”


尽管如此，这个项目标志着一个广受欢迎的编程模型的诞生，VB 对 Windows 甚至整个软件开发行业影响深远。Lucas 写道：“到 1998 年 Visual Basic 6.0 发布的时候，其地位无人能敌：所有 Windows 上进行的商业应用程序编程中有三分之二都是用 Visual Basic 完成的。全盛时期，全球近有 350 万的 VB 开发者，是 C++ 程序员的十倍还多。”


Lucas 对 Alan Cooper 及原微软 VB 团队的 Micheal Geary 进行了访谈，并把这个历史整理的过程描述为一份“[出于热爱的努力](https://twitter.com/ryanlucas/status/1636408576473452544)”。他进一步指出：“我觉得当我们失去 Visual Basic 的同时，我们也失落了一些东西。在许多方面，过去的 25 年我们一直在追逐它做对的那些理念。”


![Visual Basic 6.0，是梦想还是梦魇？](/data/attachment/album/202312/26/160109zrs243l7s6rssr4s.jpg)


据 Lucas 透露，微软在 2002 年发布 [VB.NET](http://vb.net/) 的时候，犯下了一个“非强迫性错误”。虽然语言看起来很像，但没有迁移的路径，新的 .NET 功能，如完全面向对象并不是 VB 开发者们想要的。使用率开始下降，到今天，[VB.NET](http://vb.net/) 在 .NET 编程中的地位已经落后于占主导地位的 C#。此外，微软已经失去了其在商业应用开发中的地位，.NET 只不过是诸多热门技术之一。


然而，实际上，在 .NET 推出的时候，VB 已经开始衰退。它编程的便捷性在大型且复杂的应用中开始崩解，开发者不得不痛苦地学习像“[公寓线程](https://learn.microsoft.com/en-us/windows/win32/com/processes--threads--and-apartments)”这样的奇特的 COM 概念。VB 应用还必须通过直接调用 Windows API 来增强，有许多奇怪的语言特点，即使是 Bruce Mckinney 在他的《Hardcore Visual Basic》这本书的最后一章也叫它《抄起你的斧头》。


最后，一些 VB 开发者在 1990 年代末期发现，Borland 公司的一款名叫 Delphi 的工具在几乎所有方面都优于 VB：更强大，运行速度更快，编译出来的原生代码应用程序更易于部署。Delphi 的表单设计师是受 VB 影响的，并且它的发明者 Anders Hejlsberg 后来加入了微软，创建了 C# 以及后来的 TypeScript。


微软尽力让 VB 可用，确保其运行环境到今日仍被支持，并持续让 Office 中的宏语言使用它。而 .NET 平台在应对 Java 的挑战方面比 VB 更好，甚至最终以 .NET Core 的形式成为了跨平台解决方案。


但这些并没有动摇 VB 的卓越和影响力。微软仍努力追寻着 VB 对于现称为 “群众开发者” 的人群所展现出的简洁与高效，尽管有很多尝试，一直难以复制成功。你也可以在 [这里](https://www.theregister.com/2017/02/02/our_strategy_for_visual_basic_has_shifted_microsoft_to_focus_on_core_scenarios/) 找到 [更多](https://www.theregister.com/2014/12/10/hey_dont_forget_visual_basic_says_microsoft_open_source_and_new_features_coming/) 关于 VB 的命运和缓慢死亡的信息。


*（题图：DA/7f8b8625-f569-418b-b06d-9437435473fd）*




---


via: <https://devclass.com/2023/03/20/microsofts-visual-basic-why-it-won-and-why-it-had-to-die/>


作者：[Tim Anderson](https://devclass.com/author/tanderson/) 译者：[ChatGPT](https://linux.cn/lctt/ChatGPT) 校对：[wxy](https://github.com/wxy)


OK
![Microsoft’s Visual Basic: Why it won, and why it had to die Microsoft’s Visual Basic: Why it won, and why it had to die](https://devclass.com/wp-content/uploads/2023/03/shutterstock_graves.jpg)

Developer Alan Cooper conceived Microsoft’s Visual Basic (VB) as a “shell construction kit,” according to a new history written by Retool head of design Ryan Lucas. This was in 1987, when Windows was winning users but writing applications for the operating system was hard. The prototype was called Tripod, and allowed drag and drop of objects like buttons and listboxes onto a design surface.

According to [the post](https://retool.com/visual-basic) by Lucas, the naming of these design objects changed over time, from “waldos” to “gizmos” to “controls.”

The project was shown to Microsoft CEO Bill Gates, who agreed to bundle it with the upcoming Windows 3.0. This did not happen though, for reasons that are not clear but might include politics over OS/2, which was supposedly going to replace Windows, or conflict with the team building Windows itself.

Instead, the project which was then codenamed Thunder, became a Business Language project and was shipped in 1991 as a version of BASIC. “The final product horrified Cooper, who loathed BASIC,” Lucas writes.

Nevertheless, it was the beginning of a programming model that became hugely popular, and the significance of VB both for Windows and for software development in general is hard to overstate. Lucas writes: “By the time Visual Basic 6.0 was released in 1998, its dominance was absolute: two-thirds of all business application programming on Windows PCs was done in Visual Basic. At its peak, Visual Basic had nearly 3.5 million developers worldwide, more than ten times the number of C++ programmers.”

Lucas interviewed Alan Cooper, as well as Micheal Geary from the original Microsoft VB team, and [describes](https://twitter.com/ryanlucas/status/1636408576473452544) assembling the history as a “labor-of-love project.” He adds: “I think we lost something when we lost Visual Basic. In many ways, we’ve spent the last 25 years chasing the ideas that it got pretty right.”

![](https://devclass.com/wp-content/uploads/2023/03/vb6.jpg)

According to Lucas, Microsoft made an “unforced error” when it released VB.NET in 2002. Although the language was similar, there was no migration path, and new .NET features such as full object orientation were not wanted by VB developers. Usage dropped, and today VB.NET is a poor cousin to C#, which dominates .NET programming. Further, Microsoft has lost its hold over business application development, with .NET just one of many popular approaches.

The reality though is that by the time .NET was released, VB was already losing ground. Its ease of programming fell apart in large, complex applications, and developers had to trouble themselves with arcane COM concepts like [apartment threading](https://learn.microsoft.com/en-us/windows/win32/com/processes--threads--and-apartments). VB applications also had to be supplemented by direct calls to the Windows API, and the language had many oddities, such that author Bruce Mckinney called the last chapter of his book Hardcore Visual Basic: “Bring your Hatchet.”

Some VB developers had also discovered, in the late 1990s, that a Borland tool called Delphi was superior to VB in almost every way: more powerful, faster, and compiling native code applications that were easier to deploy. Delphi’s form designer was influenced by VB, and its inventor, Anders Hejlsberg, moved on to Microsoft where he created both C# and later, TypeScript.

Microsoft did the best it could with VB, ensuring that the runtime is still supported today, and continuing to use it as the macro language in Office. The .NET platform served the company better than VB as an answer to Java, eventually even becoming a cross-platform solution in the guise of .NET Core.

None of that takes away from the excellence and influence of VB. It is also true that Microsoft has struggled to recapture the simplicity and productivity of the original VB for what it now calls citizen developers, despite many attempts. You can find more on the fate and slow death of Visual Basic [here](https://www.theregister.com/2017/02/02/our_strategy_for_visual_basic_has_shifted_microsoft_to_focus_on_core_scenarios/) and earlier [here](https://www.theregister.com/2014/12/10/hey_dont_forget_visual_basic_says_microsoft_open_source_and_new_features_coming/), over on *The Register*.

[Ruby on Rails 8.0 first beta release: A big bet on SQLite in production ](https://devclass.com/2024/10/09/ruby-on-rails-8-0-first-beta-release-a-big-bet-on-sqlite-in-production/)

[OpenAI previews major update to ChatGPT visual interface for writing and coding](https://devclass.com/2024/10/07/openai-previews-major-update-to-chatgpt-visual-interface-for-writing-and-coding/)

[Python 3.13 delayed by 'drastic change' removal of incremental garbage collector](https://devclass.com/2024/10/04/python-3-13-delayed-by-drastic-change-removal-of-incremental-garbage-collector/)

[Why Windows 11 24H2 is a big yawn for developers](https://devclass.com/2024/10/03/why-windows-11-24h2-is-a-big-yawn-for-developers/)

[The SQLite team is preparing an efficient remote replication tool](https://devclass.com/2024/10/02/the-sqlite-team-is-preparing-an-efficient-remote-replication-tool/)

[Harness previews Cloud Development Environments, AI assistants, turns to Google for AI DevOps](https://devclass.com/2024/09/27/harness-previews-cloud-development-environments-and-ai-assistants-turns-to-google-for-ai-devops/)

[Survey: Ruby on Rails devs happy to go their own way, now prefer Stimulus.js over React](https://devclass.com/2024/09/25/survey-ruby-on-rails-devs-happy-to-go-their-own-way-now-prefer-stimulus-js-over-react/)

[GitHub adds Microsoft Azure-based EU data residency to Enterprise Cloud](https://devclass.com/2024/09/25/github-adds-microsoft-azure-based-eu-data-residency-to-enterprise-cloud/)

[Deno version 2.0 is nearly done – but after over 4 years, the project's big bets have yet to pay off](https://devclass.com/2024/09/23/deno-version-2-0-is-nearly-done-but-after-over-4-years-the-projects-big-bets-have-yet-to-pay-off/)

[Pulumi releases security management product, touts benefits of IaC using general-purpose programming...](https://devclass.com/2024/09/20/pulumi-releases-security-management-product-touts-benefits-of-iac-using-general-purpose-programming-languages/)

[Apple releases Swift 6 with improved concurrency, testing, cross-platform support – enough to lift i...](https://devclass.com/2024/09/19/apple-releases-swift-6-with-improved-concurrency-testing-cross-platform-support-enough-to-lift-it-out-of-its-niche/)

[RustConf speakers affirm Rust for Linux project despite challenges of unstable Rust, maintainer resi...](https://devclass.com/2024/09/18/rustconf-speakers-affirm-rust-for-linux-project-despite-challenges-of-unstable-rust-maintainer-resignation/)