<?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%B3%9B%E5%9E%8B%E5%87%BD%E6%95%B0/</link><description>Recent content in 泛型函数 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Sat, 24 Jan 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E6%B3%9B%E5%9E%8B%E5%87%BD%E6%95%B0/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 泛型落地 4 年后，终于要支持泛型方法了！</title><link>https://tonybai.com/2026/01/24/go-generics-finally-supports-generic-methods/</link><pubDate>Sat, 24 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/24/go-generics-finally-supports-generic-methods/</guid><description>本文永久链接 – https://tonybai.com/2026/01/24/go-generics-finally-supports-generic-methods 大家好，我是Tony Bai。 &amp;gt; “我们预计 Go 永远不会添加泛型方法。” —— Go FAQ (曾几何时) 对于许多期待 Go 泛型能像 C++ 或 Java 那样强大的开发者来说，这句话曾像一盆冷水。然而，就在最近，Go ...</description></item><item><title>Go 标准库提供一个“Must” 函数？社区关于“断言式初始化”的思考</title><link>https://tonybai.com/2025/10/07/proposal-must-do/</link><pubDate>Tue, 07 Oct 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/10/07/proposal-must-do/</guid><description>本文永久链接 – https://tonybai.com/2025/10/07/proposal-must-do 大家好，我是Tony Bai。 if err != nil 不仅是 Go 代码中最常见的片段，更是其错误处理哲学的基石。它强制开发者在每一个可能出错的地方，都必须直面失败的可能性。然而，当一个错误在理论上可能发生，但在实践中（尤其是在处理静态、已知的常量时）又“不可能”发生时，这种严谨...</description></item><item><title>Go语言的“灵魂拷问”：接口只关乎行为，还是也应拥抱数据？</title><link>https://tonybai.com/2025/08/27/go-interface-embrace-data/</link><pubDate>Wed, 27 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/27/go-interface-embrace-data/</guid><description>本文永久链接 – https://tonybai.com/2025/08/27/go-interface-embrace-data 大家好，我是Tony Bai。 在 Go 语言的世界里，接口（interface）一直被视为其设计哲学的基石之一——它只关心一个类型能**做什么**（行为），而不关心它**是什么**（结构）。这种基于方法集的鸭子类型，赋予了 Go 独一无二的灵活性和解耦能力。然而，随...</description></item><item><title>解读“Cheating the Reaper”：在Go中与GC共舞的Arena黑科技</title><link>https://tonybai.com/2025/05/06/cheating-the-reaper-in-go/</link><pubDate>Tue, 06 May 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/05/06/cheating-the-reaper-in-go/</guid><description>解读“Cheating the Reaper”：在Go中与GC共舞的Arena黑科技 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * G...</description></item><item><title>Go泛型真的要来了！最早在Go 1.17版本支持</title><link>https://tonybai.com/2020/06/18/the-go-generics-is-coming-and-supported-in-go-1-17-at-the-earliest/</link><pubDate>Thu, 18 Jun 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/06/18/the-go-generics-is-coming-and-supported-in-go-1-17-at-the-earliest/</guid><description>Go官博今晨发表了Go核心团队两位大神Ian Lance Taylor和Go语言之父之一的Robert Griesemer撰写的文章“The Next Step for Generics”，该文介绍了Go泛型(Go Generics)的最新进展和未来计划。 2019年中旬，在Go 1.13版本发布前夕的GopherCon 2019大会上，Ian Lance Taylor代表Go核心团队做了有关Go...</description></item></channel></rss>