<?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>Receiver on Tony Bai</title><link>https://tonybai.com/tags/receiver/</link><description>Recent content in Receiver on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Sat, 29 Nov 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/receiver/index.xml" rel="self" type="application/rss+xml"/><item><title>“香蕉、猴子和整片丛林”：我们是否深陷于 OOP 的“优雅”陷阱？</title><link>https://tonybai.com/2025/11/29/oop-the-worst-thing-that-happened-to-programming/</link><pubDate>Sat, 29 Nov 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/11/29/oop-the-worst-thing-that-happened-to-programming/</guid><description>本文永久链接 – https://tonybai.com/2025/11/29/oop-the-worst-thing-that-happened-to-programming 大家好，我是Tony Bai。 Erlang 之父 Joe Armstrong 曾提出了一个关于面向对象编程（OOP）的、流传甚广的深刻比喻： **“你想要一根香蕉，但你得到的却是一只拿着香蕉的猴子，以及整片丛林。”** ...</description></item><item><title>一个字符引发的30%性能下降：Go值接收者的隐藏成本与优化</title><link>https://tonybai.com/2025/04/25/hidden-costs-of-go-value-receiver/</link><pubDate>Fri, 25 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/25/hidden-costs-of-go-value-receiver/</guid><description>一个字符引发的30%性能下降：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/2025/03/24/understand-methodname-scope/</link><pubDate>Mon, 24 Mar 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/03/24/understand-methodname-scope/</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/10/27/ten-details-when-using-documentation-comments/</link><pubDate>Sun, 27 Oct 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/10/27/ten-details-when-using-documentation-comments/</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/2023/05/05/go-value-and-pointer/</link><pubDate>Fri, 05 May 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/05/05/go-value-and-pointer/</guid><description>本文永久链接 – https://tonybai.com/2023/05/05/go-value-and-pointer 1\. 计算机中的值 ---------- 在百万年的演化历史中，人类对事物的属性进行了抽象，有了数量、精度、信息等概念的表示，对应的我们称之为整数、小数、文本文字等。计算机出现后，我们使用计算机对真实世界的问题进行建模，通过计算机的高效计算解决这些问题并输出答案。为了建模，计...</description></item><item><title>Go是一门面向对象编程语言吗</title><link>https://tonybai.com/2023/03/12/is-go-object-oriented/</link><pubDate>Sun, 12 Mar 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/03/12/is-go-object-oriented/</guid><description>本文永久链接 – https://tonybai.com/2023/03/12/is-go-object-oriented Go语言已经开源13年了，在近期TIOBE发布的2023年3月份的编程语言排行榜中，Go再次冲入前十，相较于Go在2022年底的排名提升了2个位次： 《Go语言第一课》专栏中关于Go在这两年开始飞起的“预言”也正在逐步成为现实^\_^，大家学习Go的热情也在快速提升， 《Go...</description></item><item><title>十分钟入门Go语言</title><link>https://tonybai.com/2023/02/23/learn-go-in-10-min/</link><pubDate>Thu, 23 Feb 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/02/23/learn-go-in-10-min/</guid><description>本文永久链接 – https://tonybai.com/2023/02/23/learn-go-in-10-min 本文旨在带大家快速入门Go语言，期望小伙伴们在花费十分钟左右通读全文后能对Go语言有一个初步的认知，为后续进一步深入学习Go奠定基础。 本文假设你完全没有接触过Go，你可能是一名精通其他编程语言的程序员，也可能是毫无编程经验、刚刚想转行为码农的热血青年。 编程简介 ---- 编程就...</description></item><item><title>GoCN社区Go读书会第二期：《Go语言精进之路》</title><link>https://tonybai.com/2022/07/07/gocn-community-go-book-club-issue2-go-programming-from-beginner-to-master/</link><pubDate>Thu, 07 Jul 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/07/07/gocn-community-go-book-club-issue2-go-programming-from-beginner-to-master/</guid><description>本文永久链接 – https://tonybai.com/2022/07/07/gocn-community-go-book-club-issue2-go-programming-from-beginner-to-master 本文是2022年6月26日我在**GoCN社区的Go读书会第二期《Go语言精进之路》直播的文字稿**。本文对直播的内容做了重新整理与修订，供喜欢阅读文字的朋友们在收看直播后...</description></item><item><title>Go 1.19新特性前瞻</title><link>https://tonybai.com/2022/06/12/go-1-19-foresight/</link><pubDate>Sun, 12 Jun 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/06/12/go-1-19-foresight/</guid><description>本文永久链接 – https://tonybai.com/2022/06/12/go-1-19-foresight 美国时间2022年5月7日，Go 1.19版本开发分支进入新特性冻结(freeze)阶段，即只能修Bug，不能再向Go 1.19版本中增加新特性了。由于上一个版本Go 1.18因引入泛型改动较大，推迟了一个月发布，这直接导致了Go 1.19版本的开发周期被缩短。 虽然开发周期少了近一...</description></item><item><title>绞尽脑汁，帮你理解方法本质并选择正确的receiver类型</title><link>https://tonybai.com/2022/05/17/understand-the-nature-of-go-method-and-how-to-choose-the-correct-receiver-type/</link><pubDate>Tue, 17 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/17/understand-the-nature-of-go-method-and-how-to-choose-the-correct-receiver-type/</guid><description>本文永久链接 – https://tonybai.com/2022/05/17/understand-the-nature-of-go-method-and-how-to-choose-the-correct-receiver-type Go语言虽然不支持经典的面向对象语法元素，比如：类、对象、继承等，但Go语言也有方法（method）。和函数相比，Go语言中的方法在声明形式上仅仅多了一个参数，G...</description></item><item><title>为什么这个T类型实例无法调用*T类型的方法</title><link>https://tonybai.com/2022/02/27/go-addressable/</link><pubDate>Sun, 27 Feb 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/02/27/go-addressable/</guid><description>本文永久链接 – https://tonybai.com/2022/02/27/go-addressable 近期在“Go语言第一课”专栏后台看到一位学员的一则留言，如下图： 由于有课程上下文，所以我这里将问题的上下文重新描述一下。 在专栏的第25讲，我们学习了Go语言提供的一个“语法糖”，比如下面这个例子： ``` type T struct { a int } func (t T) M1() ...</description></item><item><title>defer函数参数求值简要分析</title><link>https://tonybai.com/2018/03/23/the-analysis-of-the-param-evaluation-of-defer-functions/</link><pubDate>Fri, 23 Mar 2018 00:00:00 +0800</pubDate><guid>https://tonybai.com/2018/03/23/the-analysis-of-the-param-evaluation-of-defer-functions/</guid><description>一. 引子 书接上文，在发表了《对一段Go语言代码输出结果的简要分析》一文之后，原问题提出者又有了新问题，这是一个典型Gopher学习Go的历程，想必很多Gopher们，包括我自己都遇到过的。我们先来看看这段代码(来自原问题提出者)： // https://play.golang.org/p/dOUFNj96EIQ package main import &amp;#34;fmt&amp;#34; func main() { v...</description></item><item><title>对一段Go语言代码输出结果的简要分析</title><link>https://tonybai.com/2018/03/20/the-analysis-of-output-results-of-a-go-code-snippet/</link><pubDate>Tue, 20 Mar 2018 00:00:00 +0800</pubDate><guid>https://tonybai.com/2018/03/20/the-analysis-of-output-results-of-a-go-code-snippet/</guid><description>年后事情实在是多，各种被催进度，于是好长一段时间未更博客了，自责中….。今天蹦出来热热身^0^！ 中午在微博私信中看到一封来自某Gopher的咨询，他贴了一段代码，并表示对代码的输出结果的不解，希望我能帮他分析一下。他的代码如下： //testslicerange.go package main import ( &amp;#34;fmt&amp;#34; &amp;#34;time&amp;#34; ) type field struct { name st...</description></item></channel></rss>