<?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/%E7%B1%BB%E5%9E%8B%E7%B3%BB%E7%BB%9F/</link><description>Recent content in 类型系统 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Tue, 16 Jun 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E7%B1%BB%E5%9E%8B%E7%B3%BB%E7%BB%9F/index.xml" rel="self" type="application/rss+xml"/><item><title>为什么说“编译通过，就能运行”？Google 专家 Alice 揭秘 Rust 的工程美学与底层逻辑</title><link>https://tonybai.com/2026/06/16/why-if-it-compiles-it-runs-rust-engineering-aesthetics-and-logic/</link><pubDate>Tue, 16 Jun 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/06/16/why-if-it-compiles-it-runs-rust-engineering-aesthetics-and-logic/</guid><description>本文永久链接 – https://tonybai.com/2026/06/16/why-if-it-compiles-it-runs-rust-engineering-aesthetics-and-logic 大家好，我是Tony Bai。 在软件工程界，有一句流传甚广、近乎玄学的名言：“如果你的 Rust 代码通过了编译，那么它就已经可以正确运行了。” 对于被 Java 的空指针异常（NullP...</description></item><item><title>Rust 看了流泪，AI 看了沉默：扒开 Go 泛型最让你抓狂的“残疾”类型推断</title><link>https://tonybai.com/2026/03/27/function-type-inference-should-work-in-all-assignment-contexts/</link><pubDate>Fri, 27 Mar 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/03/27/function-type-inference-should-work-in-all-assignment-contexts/</guid><description>本文永久链接 – https://tonybai.com/2026/03/27/function-type-inference-should-work-in-all-assignment-contexts 大家好，我是Tony Bai。 在这个大模型（AI）写代码如喝水一般简单的时代，你有没有遇到过一种极其憋屈的场景： 你让 Claude Code 或者 Codex 帮你写了一段 Go 语言代码，...</description></item><item><title>Go 语言之父亲自下场道歉：藏在 Spec 里的十年“笔误”，终于要修正了！</title><link>https://tonybai.com/2026/03/25/go-spec-contradiction-in-types-section/</link><pubDate>Wed, 25 Mar 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/03/25/go-spec-contradiction-in-types-section/</guid><description>本文永久链接 – https://tonybai.com/2026/03/25/go-spec-contradiction-in-types-section 大家好，我是Tony Bai。 在 Go 语言的世界里，type 是我们每天都在打交道的关键字。但如果我今天问你一个极其基础的问题： **Go 语言内置的 bool 类型，到底是不是一个“Defined Type（已定义类型）”？** 你可能...</description></item><item><title>当“安全性”遭遇“交付速度”：2026 年，我为什么告别了 Rust</title><link>https://tonybai.com/2026/02/21/safety-vs-delivery-speed-why-farewell-rust-in-2026/</link><pubDate>Sat, 21 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/21/safety-vs-delivery-speed-why-farewell-rust-in-2026/</guid><description>本文永久链接 – https://tonybai.com/2026/02/21/safety-vs-delivery-speed-why-farewell-rust-in-2026 大家好，我是Tony Bai。 在软件工程的铁三角中，Rust 占据了“安全性”与“性能”的绝对高地。凭借借用检查器（Borrow Checker）和极其严格的类型系统，它向开发者承诺了一个没有内存错误、没有空指针崩溃...</description></item><item><title>数据打脸刻板印象：Go 的“样板代码”竟然和 Rust 一样多？</title><link>https://tonybai.com/2026/02/08/go-boilerplate-code-vs-rust-data-refutes-stereotypes/</link><pubDate>Sun, 08 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/08/go-boilerplate-code-vs-rust-data-refutes-stereotypes/</guid><description>本文永久链接 – https://tonybai.com/2026/02/08/go-boilerplate-code-vs-rust-data-refutes-stereotypes 大家好，我是Tony Bai。 在编程语言的鄙视链中，Go 语言常常因为其“繁琐”而饱受诟病。 “if err != nil 写断手”、“缺乏语法糖”、“到处都是重复的样板代码”…… 这些似乎已经成为了 Go 的标...</description></item><item><title>让编译器成为你的副驾驶：告别“防御性编程”，拥抱“类型驱动开发”</title><link>https://tonybai.com/2026/01/04/stop-lying-to-the-compiler/</link><pubDate>Sun, 04 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/04/stop-lying-to-the-compiler/</guid><description>本文永久链接 – https://tonybai.com/2026/01/04/stop-lying-to-the-compiler 大家好，我是Tony Bai。 “半夜被值班的运维同事叫醒，发现生产环境崩了，原因是一个深藏在业务逻辑里的 nil 指针异常。” 这个场景，对于每个后端开发者来说都是挥之不去的噩梦。事后复盘时，我们往往会懊恼：“为什么这里没加 if != nil 判断？”然后，我们...</description></item><item><title>Rust 布道者Jon Gjengset深度访谈：在 AI 时代，我们该如何思考编程、职业与未来？</title><link>https://tonybai.com/2025/10/30/jon-gjengset-rust-ai-future/</link><pubDate>Thu, 30 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/30/jon-gjengset-rust-ai-future/</guid><description>本文永久链接 – https://tonybai.com/2025/10/30/jon-gjengset-rust-ai-future 大家好，我是Tony Bai。 他是 MIT 的博士，Rust 社区的知名布道者，《Rust for Rustaceans》作者，前亚马逊首席工程师，现欧洲顶尖 AI 防务公司 Helsing 的首席工程师。Jon Gjengset 的履历，本身就是一部现代软件工...</description></item><item><title>告别懵圈：实战派 Gopher 的类型理论入门</title><link>https://tonybai.com/2025/10/30/type-theory-intro-for-gopher/</link><pubDate>Thu, 30 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/30/type-theory-intro-for-gopher/</guid><description>本文永久链接 – https://tonybai.com/2025/10/30/type-theory-intro-for-gopher 大家好，我是Tony Bai。 你是否曾有过这样的经历：在浏览一个关于 Go 泛型或接口设计的 GitHub issue 或技术提案时，评论区里的大佬们突然开始讨论 “Sum Type”、“Product Type”、“Parametric Polymorphi...</description></item><item><title>超越时间的智慧：重读那些定义了现代软件开发的经典文章</title><link>https://tonybai.com/2025/10/04/the-software-essays-that-shaped-me/</link><pubDate>Sat, 04 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/04/the-software-essays-that-shaped-me/</guid><description>本文永久链接 – https://tonybai.com/2025/10/04/the-software-essays-that-shaped-me 大家好，我是Tony Bai。 二十年前，一位年轻的程序员在还未踏入职场时，便开始沉浸于软件开发的博客文章与深刻思考之中。二十年后，他已成为一名资深工程师，回首望去，成千上万的文字中，只有寥寥数篇真正沉淀下来，如基石般塑造了他的思维方式和职业生涯。 ...</description></item><item><title>Gopher视角：Java 开发者转向 Go 时，最需要“掰过来”的几个习惯</title><link>https://tonybai.com/2025/06/27/from-java-to-go/</link><pubDate>Fri, 27 Jun 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/06/27/from-java-to-go/</guid><description>Gopher视角：Java 开发者转向 Go 时，最需要“掰过来”的几个习惯 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进...</description></item><item><title>从线下到线上，我的“Go语言进阶课”终于在极客时间与大家见面了！</title><link>https://tonybai.com/2025/05/12/go-advanced-course/</link><pubDate>Mon, 12 May 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/05/12/go-advanced-course/</guid><description>从线下到线上，我的“Go语言进阶课”终于在极客时间与大家见面了！ - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ ...</description></item><item><title>“类型名称”在Go语言规范中的演变</title><link>https://tonybai.com/2024/09/24/the-evolution-of-type-name-in-go-spec/</link><pubDate>Tue, 24 Sep 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/09/24/the-evolution-of-type-name-in-go-spec/</guid><description>“类型名称”在Go语言规范中的演变 | Tony Bai =============== Tony Bai一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * 关于我 * 文章列表 “类型名称”在Go语言规范中的演...</description></item><item><title>Go类型系统：有何与众不同</title><link>https://tonybai.com/2022/12/18/go-type-system/</link><pubDate>Sun, 18 Dec 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/12/18/go-type-system/</guid><description>本文永久链接 – https://tonybai.com/2022/12/18/go-type-system Go是一门强类型的静态编程语言。使用Go编程，我们的每一行代码几乎都离不开**类型**。因此，深入学习Go，我们首先要对Go的类型系统(type system)有一个全面和深入的认知。Go类型系统可以给予我们一个全局整体的视角，以帮助我们更好地学习和理解Go语言中那些具体的与类型相关的内容...</description></item><item><title>评点2021-2022年上市的那些Go语言新书</title><link>https://tonybai.com/2022/06/01/reviewing-those-new-go-language-books-coming-out-in-2021-2022/</link><pubDate>Wed, 01 Jun 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/06/01/reviewing-those-new-go-language-books-coming-out-in-2021-2022/</guid><description>本文永久链接 – https://tonybai.com/2022/06/01/reviewing-those-new-go-language-books-coming-out-in-2021-2022 计算机科学与技术这个工业大类与传统工业类别相比还很“年轻”，并且由于历史原因，整个计算机科学与技术学科的奠基都是由欧美人完成的，因此但凡诞生一门新IT技术或新编程语言，我们首先参考的都是来自欧美的...</description></item><item><title>使用reflect包在反射世界里读写各类型变量</title><link>https://tonybai.com/2021/04/19/variable-operation-using-reflection-in-go/</link><pubDate>Mon, 19 Apr 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/04/19/variable-operation-using-reflection-in-go/</guid><description>本文永久链接 – https://tonybai.com/2021/mm/dd/variable-operation-using-reflection-in-go Go在标准库中提供的reflect包让Go程序具备运行时的反射能力(reflection)，但这种反射能力也是一把“双刃剑”，它在解决一类特定问题方面具有优势，但也带来了逻辑不清晰、性能问题以及难于发现问题和调试等不足。不过从Go诞生伊...</description></item><item><title>Rust vs. Go：为什么强强联合会更好</title><link>https://tonybai.com/2021/03/15/rust-vs-go-why-they-are-better-together/</link><pubDate>Mon, 15 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/15/rust-vs-go-why-they-are-better-together/</guid><description>本文翻译自乔纳森·特纳（Jonathan Turner）和史蒂夫·弗朗西亚（Steve Francia）的文章《Rust vs. Go: Why They’re Better Together》。 &amp;gt; 史蒂夫·弗朗西亚（Steve Francia）：在过去的25年里，Steve Francia建立了一些最具创新性和成功的技术和公司，这些技术和公司已经成为云计算的基础，被全世界的企业和开发者所接受。...</description></item><item><title>Go语言联合作者Rob Pike专访：Go确实已成为云基础架构的语言</title><link>https://tonybai.com/2020/05/01/rob-pike-interview-go-become-the-language-of-cloud-infrastructure/</link><pubDate>Fri, 01 May 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/05/01/rob-pike-interview-go-become-the-language-of-cloud-infrastructure/</guid><description>&amp;gt; 尽管看到Docker，Kubernetes和用Go编写的云计算的许多其他组件令人欣喜和重要，但也许并不奇怪。Go确实已经成为云基础架构的语言。- Rob Pike，Go编程语言的联合作者 本文翻译自《Rob Pike interview: “Go has indeed become the language of cloud infrastructure”》。 简介 -- 我们与Go编程语言之...</description></item><item><title>TB一周萃选[第3期]</title><link>https://tonybai.com/2017/12/30/3rd-issue-of-the-tech-weekly-carefully-chosen-by-tonybai/</link><pubDate>Sat, 30 Dec 2017 00:00:00 +0800</pubDate><guid>https://tonybai.com/2017/12/30/3rd-issue-of-the-tech-weekly-carefully-chosen-by-tonybai/</guid><description>本文是首发于个人微信公众号的文章**“TB一周萃选\[第3期\]”**的归档。 &amp;gt; 《岁旦》 &amp;gt; &amp;gt; &amp;gt; 宋伯仁 宋代诗人 &amp;gt; &amp;gt; 居间无贺客，早起只如常。桃版随人换，梅花隔岁香。 &amp;gt; 　　春风回笑语，云气卜丰穰。柏酒何劳劝，心平寿自长。 本期萃选是2017年的最后一期，也是迎接2018新年“承前启后”的一期。 对于现代中国人来说，公历新年又称为“元旦”。但稍有些历史常识的朋友都会知道：此“元旦”...</description></item></channel></rss>