<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>工厂模式 on Tony Bai</title><link>https://tonybai.com/tags/%E5%B7%A5%E5%8E%82%E6%A8%A1%E5%BC%8F/</link><description>Recent content in 工厂模式 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Tue, 28 Oct 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E5%B7%A5%E5%8E%82%E6%A8%A1%E5%BC%8F/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 考古：错误处理的“语法糖”之战与最终的“投降”</title><link>https://tonybai.com/2025/10/28/go-archaeology-error-handling/</link><pubDate>Tue, 28 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/28/go-archaeology-error-handling/</guid><description>本文永久链接 – https://tonybai.com/2025/10/28/go-archaeology-error-handling 大家好，我是Tony Bai。 if err != nil，这可能是 Go 语言中最具辨识度，也最富争议性的代码片段。它如同一块磐石，奠定了 Go 错误处理哲学的基石，但也因其“繁琐”而常年位居 Go 开发者年度调查“最不满意特性”榜首。 许多新入门的 Gop...</description></item><item><title>超越零值：Go 语言“构造模式”深度指南</title><link>https://tonybai.com/2025/09/12/go-constructor-pattern-guide/</link><pubDate>Fri, 12 Sep 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/09/12/go-constructor-pattern-guide/</guid><description>本文永久链接 – https://tonybai.com/2025/09/12/go-constructor-pattern-guide 大家好，我是Tony Bai。 Go 语言的设计哲学崇尚简约与直白(straightforward)。其中，结构体字面量 (Struct Literal) 的存在，让我们可以用极其简单的方式创建数据结构。然而，在构建大型、复杂的系统时，这种简单性也可能成为一把双...</description></item><item><title>工厂模式三剑客</title><link>https://tonybai.com/2007/05/21/the-three-musketeers-of-factory-pattern/</link><pubDate>Mon, 21 May 2007 00:00:00 +0800</pubDate><guid>https://tonybai.com/2007/05/21/the-three-musketeers-of-factory-pattern/</guid><description>前不久参加了一个为期四天的设计模式培训，公司以前组织过很多次设计模式培训，主题多为&amp;#39;Java与设计模式&amp;#39;，自己一直从事C相关的开发，也就不好越界参与这类培训。而这次主题换成了&amp;#39;C++设计模式&amp;#39;，我参加也就名正言顺了。按照人力资源部工作人员的说法这是第一次请老师讲C++与设计模式，这个老师也是第一次给我们公司做培训，因为没有先例，无从知道效果如何，不像以前侯捷来公司培训C++，一般参与的同事都清楚那...</description></item></channel></rss>