<?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>For on Tony Bai</title><link>https://tonybai.com/tags/for/</link><description>Recent content in For on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 07 Nov 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/for/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 的“简单”幻象：易于上手，难于精通</title><link>https://tonybai.com/2025/11/07/go-simple-illusion-easy-to-learn-hard-to-master/</link><pubDate>Fri, 07 Nov 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/11/07/go-simple-illusion-easy-to-learn-hard-to-master/</guid><description>本文永久链接 – https://tonybai.com/2025/11/07/go-simple-illusion-easy-to-learn-hard-to-master 大家好，我是Tony Bai。 “Go 语言看起来如此简单，我的这种假设是错的吗？” 近日，一位刚接触 Go 几个月的新手在reddit golang论坛发出了这样一个真诚的提问。他感觉 Go “超级简单”，并好奇自己是否因...</description></item><item><title>二进制的“魔术”：每个 Go 程序员都应掌握的位操作艺术</title><link>https://tonybai.com/2025/08/13/bit-manipulation-in-go/</link><pubDate>Wed, 13 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/13/bit-manipulation-in-go/</guid><description>二进制的“魔术”：每个 Go 程序员都应掌握的位操作艺术 - Tony Bai Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ * 关于我 * 我的技术专栏 * 文章列...</description></item><item><title>Go 比 Python 更懂“Python 之禅”？</title><link>https://tonybai.com/2025/07/19/go-understand-the-zen-of-python-better-than-python/</link><pubDate>Sat, 19 Jul 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/07/19/go-understand-the-zen-of-python-better-than-python/</guid><description>本文永久链接 – https://tonybai.com/2025/07/19/go-understand-the-zen-of-python-better-than-python 大家好，我是Tony Bai。 最近，在国外的 Go 语言社区（Reddit r/golang）上，一个帖子引发了热烈的讨论。标题颇具“引战”意味：“Go似乎比Python更好地实现了Python之禅”。 这听起来像个...</description></item><item><title>Go x/exp/xiter提案搁浅背后：社区的选择与深度思考</title><link>https://tonybai.com/2025/05/29/xiter-declined/</link><pubDate>Thu, 29 May 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/05/29/xiter-declined/</guid><description>Go x/exp/xiter提案搁浅背后：社区的选择与深度思考 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶课FAQ *...</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>WaitGroup.Go要来了？Go官方提案或让你告别Add和Done样板代码</title><link>https://tonybai.com/2025/04/03/waitgroup-go-proposal/</link><pubDate>Thu, 03 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/03/waitgroup-go-proposal/</guid><description>WaitGroup.Go要来了？Go官方提案或让你告别Add和Done样板代码 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言...</description></item><item><title>Go 1.23新特性前瞻</title><link>https://tonybai.com/2024/05/30/go-1-23-foresight/</link><pubDate>Thu, 30 May 2024 00:00:00 +0800</pubDate><guid>https://tonybai.com/2024/05/30/go-1-23-foresight/</guid><description>本文永久链接 – https://tonybai.com/2024/05/30/go-1-23-foresight 2024年5月22日，Go 1.23版本功能特性正式冻结，后续将只改bug，不增加新feature。 对Go团队来说，这意味着开始了Go 1.23rc1的冲刺，对我们普通Gopher而言，这意味着**是时候对Go 1.23新增的功能做一些前瞻了**！ 在Go没有发布Go 1.23rc...</description></item><item><title>Go 1.22新特性前瞻</title><link>https://tonybai.com/2023/12/25/go-1-22-foresight/</link><pubDate>Mon, 25 Dec 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/12/25/go-1-22-foresight/</guid><description>本文永久链接 – https://tonybai.com/2023/12/25/go-1-22-foresight 美国时间2023年12月20日，Go官方宣布Go 1.22rc1发布，开启了为期2个多月的、常规的公测之旅，Go 1.22预计将于2024.2月份正式发布！ 除了在官网下载Go 1.22rc1版本进行新特性体验之外，我们还可以通过在线的Go Playground选择“Go dev b...</description></item><item><title>Go，14周年[译]</title><link>https://tonybai.com/2023/11/11/go-opensource-14-years/</link><pubDate>Sat, 11 Nov 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/11/11/go-opensource-14-years/</guid><description>本文永久链接 – https://tonybai.com/2023/11/11/go-opensource-14-years 国内的双十一购物狂欢已没有了当年的那种热闹与喧嚣，但大洋彼岸的Go团队却始终保持稳中有增的开发和语言演进节奏。今晨Go核心团队的Russ Cox代表Go语言项目团队在Go官博上发表了《Fourteen Years of Go》的博文，纪念Go语言开源14周年，并对2023年...</description></item><item><title>Go 1.21中值得关注的几个变化</title><link>https://tonybai.com/2023/08/20/some-changes-in-go-1-21/</link><pubDate>Sun, 20 Aug 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/08/20/some-changes-in-go-1-21/</guid><description>本文永久链接 – https://tonybai.com/2023/08/20/some-changes-in-go-1-21 美国时间2023年8月8日，Go团队在Go官博上正式发布了1.21版本！ 早在今年4月末，我就撰写了文章《Go 1.21新特性前瞻》，对Go 1.21可能引入的新特性、新优化和新标准库包做了粗略梳理。 在6月初举办的GopherChina 2023大会上，我又以“The ...</description></item><item><title>聊聊Go语言的控制语句</title><link>https://tonybai.com/2023/05/27/control-flow-statement-in-go/</link><pubDate>Sat, 27 May 2023 00:00:00 +0800</pubDate><guid>https://tonybai.com/2023/05/27/control-flow-statement-in-go/</guid><description>本文永久链接 – https://tonybai.com/2023/05/27/control-flow-statement-in-go 在高级编程语言中，控制流语句(control-flow statement)是一类用于控制程序执行流程的语句，以下简称为**控制语句**。它们可以根据条件或循环执行相应的代码块，或者跳转到指定位置执行代码。 常见的控制语句包括： * 条件语句：根据条件执行不同的...</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>针对大型数组的迭代，for range真的比经典for loop慢吗？</title><link>https://tonybai.com/2022/03/19/for-range-vs-classic-for-loop-when-iterating-large-array/</link><pubDate>Sat, 19 Mar 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/03/19/for-range-vs-classic-for-loop-when-iterating-large-array/</guid><description>本文永久链接 – https://tonybai.com/2022/03/19/for-range-vs-classic-for-loop-when-iterating-large-array Go语言推崇“**一件事情仅有一个作法**”！比如：Go仅保留一类循环控制语句，那就是**经典版的for loop**： ``` for i := 0; i &amp;lt; 100; i++ { ... ... } `...</description></item><item><title>Go语言中常见的几种反模式[译]</title><link>https://tonybai.com/2021/03/31/common-anti-patterns-in-go/</link><pubDate>Wed, 31 Mar 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/03/31/common-anti-patterns-in-go/</guid><description>本文翻译自Saif Sadiq的文章《Common anti-patterns in Go》。 众所周知，编码是一门艺术，就像每个拥有精湛艺术并为之感到骄傲的工匠一样，我们作为开发人员也为我们编写的代码感到自豪。为了获得最佳效果，艺术家不断寻找可提高其手艺的方法和工具。同样，作为开发人员，我们也在不断提高自己的技能，并对”如何写出好的代码”这个最重要的问题的答案保持好奇。 弗雷德里克·布鲁克斯（F...</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 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>