<?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/%E6%9E%9A%E4%B8%BE/</link><description>Recent content in 枚举 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 06 Feb 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E6%9E%9A%E4%B8%BE/index.xml" rel="self" type="application/rss+xml"/><item><title>“Go 2，请不要发生！”：如果 Go 变成了“缝合怪”，你还会爱它吗？</title><link>https://tonybai.com/2026/02/06/go-2-dont-become-a-frankenstein-monster/</link><pubDate>Fri, 06 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/06/go-2-dont-become-a-frankenstein-monster/</guid><description>本文永久链接 – https://tonybai.com/2026/02/06/go-2-dont-become-a-frankenstein-monster 大家好，我是Tony Bai。 &amp;gt; “Go 2, please don’t make it happen.” 近日，一张充满讽刺意味的老梗图在 r/golang 社区又炸开了锅。图片的上方，是我们熟悉的 Gopher 吉祥物——那只呆萌、简...</description></item><item><title>2025 Go 官方调查解读：91% 满意度背后的隐忧与 AI 时代的“双刃剑”</title><link>https://tonybai.com/2026/01/23/go-developer-2025-survey-result/</link><pubDate>Fri, 23 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/23/go-developer-2025-survey-result/</guid><description>本文永久链接 – https://tonybai.com/2026/01/23/go-developer-2025-survey-result 大家好，我是Tony Bai。 近日，Go 官方发布了 2025 年开发者调查报告。作为 Go 社区的年度“体检报告”，这份基于 **5,379** 份有效问卷的数据，为我们勾勒出了一幅清晰的 Go 生态全景图。 总体来看，Go 依然是一个令人愉悦的语言，...</description></item><item><title>告别 interface{} 模拟，Go 终于要有真正的 Union 类型了？</title><link>https://tonybai.com/2025/12/29/go-community-new-sum-type-end-interface-union-types/</link><pubDate>Mon, 29 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/29/go-community-new-sum-type-end-interface-union-types/</guid><description>本文永久链接 – https://tonybai.com/2025/12/29/go-community-new-sum-type-end-interface-union-types 大家好，我是Tony Bai。 &amp;gt; “Go 什么时候支持枚举？” &amp;gt; &amp;gt; “Go 什么时候有真正的联合类型？” 这可能是 Go 语言诞生以来，被问得最多的问题之一。现有的解决方案——无论是用 const 模拟枚举，还...</description></item><item><title>Go 的 iota：设计缺陷还是“黑魔法”？—— 从一条“咆哮”推文谈起</title><link>https://tonybai.com/2025/10/25/go-iota-flaw-or-magic/</link><pubDate>Sat, 25 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/25/go-iota-flaw-or-magic/</guid><description>本文永久链接 – https://tonybai.com/2025/10/25/go-iota-flaw-or-magic 大家好，我是Tony Bai。 “我一直在 DUNK Go，因为我觉得它是一门糟糕的语言。但我从未意识到，它比无底的绝望深渊还要深。这TMD是啥？” 近日，一条关于 Go 语言 iota 的“咆哮”推文在开发者社区引发了热议。推文作者 Dmitrii Kovanikov 贴出...</description></item><item><title>“我们放弃了”——Go 团队坦诚布公，聊聊那些可能永远不会加入 Go 的功能</title><link>https://tonybai.com/2025/09/22/go-team-gave-up-on-features/</link><pubDate>Mon, 22 Sep 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/09/22/go-team-gave-up-on-features/</guid><description>本文永久链接 – https://tonybai.com/2025/09/22/go-team-gave-up-on-features 大家好，我是Tony Bai。 在 GopherCon Europe 2025 的 Go 团队座谈会上，Michael Stapelberg(负责go protobuf)、Damien Neil(负责Go安全相关)、Michael Pratt(负责Go运行时和Go...</description></item><item><title>“错误即值”，不同实现：Go与Zig错误处理哲学对比</title><link>https://tonybai.com/2025/04/30/go-vs-zig-in-error-handling/</link><pubDate>Wed, 30 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/30/go-vs-zig-in-error-handling/</guid><description>本文永久链接 – https://tonybai.com/2025/04/30/go-vs-zig-in-error-handling 大家好，我是Tony Bai。 使用Go语言有些年头的开发者，大多对其错误处理机制有着复杂的情感。一方面，我们认同 Rob Pike 所倡导的“错误即值 (Errors are values)”的核心哲学——错误不是需要特殊通道（如异常）处理的“二等公民”，它们是...</description></item><item><title>Go的简洁神话？转Go前你需要知道的5个“真相”</title><link>https://tonybai.com/2025/04/29/hard-truths-before-switching-to-go/</link><pubDate>Tue, 29 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/29/hard-truths-before-switching-to-go/</guid><description>Go的简洁神话？转Go前你需要知道的5个“真相” - 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/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>使用反射操作channel</title><link>https://tonybai.com/2022/11/15/using-reflect-to-manipulate-channels/</link><pubDate>Tue, 15 Nov 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/11/15/using-reflect-to-manipulate-channels/</guid><description>本文永久链接 – https://tonybai.com/2022/11/15/using-reflect-to-manipulate-channels * * * 今年教师节极客时间送给讲师4999 SVIP卡，一直没顾过来用，上周激活后在极客时间的众多精品课和专栏中徜徉，收获颇丰。尤其是在拜读鸟窝老师的《Go并发编程实战课》 后，get到一个以前从未用过的“技能点”：**使用reflect操作...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第二部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part2/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 第一部分参见[《Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱\[译\]（第一部分）》](https://tonybai.com/2021/03/29/darker-corners-of-go-part1) 7\. 字符串和字节数组 ------------ 1) Go中的字符串 Go字符串的内...</description></item><item><title>Go语言的“黑暗角落”：盘点学习Go语言时遇到的那些陷阱[译]（第一部分）</title><link>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</link><pubDate>Mon, 29 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/29/darker-corners-of-go-part1/</guid><description>本文翻译自Rytis Bieliunas的文章《Darker Corners of Go》。 &amp;gt; 译注：若干年前，Kyle Quest曾发过一篇名为“50 Shades of Go: Traps, Gotchas, and Common Mistakes for New Golang Devs”的文章，仿效著名的《C Traps and Pitfalls》编写了50条Go语言的陷阱与缺陷，一时在G...</description></item><item><title>Go与C语言的互操作</title><link>https://tonybai.com/2012/09/26/interoperability-between-go-and-c/</link><pubDate>Wed, 26 Sep 2012 00:00:00 +0800</pubDate><guid>https://tonybai.com/2012/09/26/interoperability-between-go-and-c/</guid><description>Go有强烈的C背景，除了语法具有继承性外，其设计者以及其设计目标都与C语言有着千丝万缕的联系。在Go与C语言互操作(Interoperability)方面，Go更是提供了强大的支持。尤其是在Go中使用C，你甚至可以直接在Go源文件中编写C代码，这是其他语言所无法望其项背的。 在如下一些场景中，可能会涉及到Go与C的互操作： 1、提升局部代码性能时，用C替换一些Go代码。C之于Go，好比汇编之于C。...</description></item></channel></rss>