<?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>Gospec on Tony Bai</title><link>https://tonybai.com/tags/gospec/</link><description>Recent content in Gospec on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Wed, 25 Mar 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/gospec/index.xml" rel="self" type="application/rss+xml"/><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>Go 1.25规范大扫除：移除“Core Types”，为更灵活的泛型铺路</title><link>https://tonybai.com/2025/03/27/remove-coretypes-from-go-spec/</link><pubDate>Thu, 27 Mar 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/03/27/remove-coretypes-from-go-spec/</guid><description>Go 1.25规范大扫除：移除“Core Types”，为更灵活的泛型铺路 - 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/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 1.23中的自定义迭代器与iter包</title><link>https://tonybai.com/2024/06/24/range-over-func-and-package-iter-in-go-1-23/</link><pubDate>Mon, 24 Jun 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/06/24/range-over-func-and-package-iter-in-go-1-23/</guid><description>本文永久链接 – https://tonybai.com/2024/06/24/range-over-func-and-package-iter-in-go-1-23 在《Go 1.23新特性前瞻》一文中，我们提到了Go 1.23中增加的一个主要的语法特性就是**支持了用户自定义iterator**，即range over func试验特性的正式转正。为此，Go 1.23还在标准库中增加了iter...</description></item><item><title>Go 1.22引入的包级变量初始化次序问题</title><link>https://tonybai.com/2024/03/29/the-issue-in-pkg-level-var-init-order-in-go-1-22/</link><pubDate>Fri, 29 Mar 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/03/29/the-issue-in-pkg-level-var-init-order-in-go-1-22/</guid><description>本文永久链接 – https://tonybai.com/2024/03/29/the-issue-in-pkg-level-var-init-order-in-go-1-22 细心的朋友可能已经注意到，从春节后，我的博客就“停更”了！实际上，这一情况部分是因为工作上的事务繁忙，另一部分则是因为我将工作之外的闲暇时间更多地投入到一本即将于今年中下旬出版的书的撰写了：在之前的积累基础上，我花了两个多...</description></item><item><title>len(s)表达式的求值结果究竟是常量还是变量？我来告诉你</title><link>https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable/</link><pubDate>Thu, 24 Mar 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable/</guid><description>本文永久链接 – https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable **len**是Go预定义标识符，同时也是Go内置的预定义函数，通过go doc工具我们能查到len函数的doc如下： ``` $go doc builtin.len package builtin // im...</description></item><item><title>对一段有关Go Code Block和变量作用域的代码的简要分析</title><link>https://tonybai.com/2018/05/11/the-analysis-of-a-go-code-snippet-about-code-blocks-and-scope/</link><pubDate>Fri, 11 May 2018 00:00:00 +0800</pubDate><guid>https://tonybai.com/2018/05/11/the-analysis-of-a-go-code-snippet-about-code-blocks-and-scope/</guid><description>近期，Go team的David CrawShaw在twitter上贴出了一段代码，如下： func main() { if a := 1; false { } else if b := 2; false { } else if c := 3; false { } else { println(a, b, c) } } David CrawShaw想表达的意图是gopher们很少在”else if...</description></item></channel></rss>