<?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>Ast on Tony Bai</title><link>https://tonybai.com/tags/ast/</link><description>Recent content in Ast on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 22 May 2026 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/ast/index.xml" rel="self" type="application/rss+xml"/><item><title>十年难题终获突破：揭秘 Go 1.27 接口逃逸分析优化</title><link>https://tonybai.com/2026/05/22/go-1-27-interface-escape-analysis-optimization-breakthrough/</link><pubDate>Fri, 22 May 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/05/22/go-1-27-interface-escape-analysis-optimization-breakthrough/</guid><description>本文永久链接 – https://tonybai.com/2026/05/22/go-1-27-interface-escape-analysis-optimization-breakthrough 大家好，我是Tony Bai。 在日常的 Go 语言开发中，有这样一段极其普通、普通到闭着眼睛都能敲出来的代码： ``` val := 1000 fmt.Sprintf(&amp;#34;Result: %d&amp;#34;, v...</description></item><item><title>数据说话：Go 1.26 或成近年来“问题最多”的大版本，现在升级安全吗？</title><link>https://tonybai.com/2026/03/06/go-1-26-most-problematic-release/</link><pubDate>Fri, 06 Mar 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/03/06/go-1-26-most-problematic-release/</guid><description>本文永久链接 – https://tonybai.com/2026/03/06/go-1-26-most-problematic-release 大家好，我是Tony Bai。 2026 年 2 月，Go 1.26 如约而至。伴随着 new(expr) 语法糖的引入、Green Tea GC 的全面转正，以及go fix 现代化重构等一系列重磅特性，许多 Gopher 都按捺不住尝鲜的冲动。 然而...</description></item><item><title>Go 1.26 重磅更新：用 go fix 重塑代码现代化的艺术</title><link>https://tonybai.com/2026/02/19/using-go-fix-to-modernize-go-code/</link><pubDate>Thu, 19 Feb 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/02/19/using-go-fix-to-modernize-go-code/</guid><description>本文永久链接 – https://tonybai.com/2026/02/19/using-go-fix-to-modernize-go-code 大家好，我是Tony Bai。 2026年2月，Go 1.26 正式发布。除了语言层面的新特性（如 new(expr)）和运行时的性能提升（如 Green Tea GC）之外，工具链迎来了一次史诗级的升级：go fix 命令被彻底重写。 在过去，go ...</description></item><item><title>TypeScript 编译器 Go 重写版提速 10 倍：微软团队深度揭秘幕后工程细节</title><link>https://tonybai.com/2026/01/27/typescript-compiler-go-rewrite-10x-speed-microsoft-details/</link><pubDate>Tue, 27 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/27/typescript-compiler-go-rewrite-10x-speed-microsoft-details/</guid><description>本文永久链接 – https://tonybai.com/2026/01/27/typescript-compiler-go-rewrite-10x-speed-microsoft-details 大家好，我是Tony Bai。 “JavaScript 是一门很棒的语言，但它并不是为了编写编译器而设计的。” 备受瞩目的 TypeScript 编译器 Go 重写版（代号 TypeScript 7.0...</description></item><item><title>Go 语言的“魔法”时刻：如何用 -toolexec 实现零侵入式自动插桩？</title><link>https://tonybai.com/2026/01/19/unleashing-the-go-toolchain/</link><pubDate>Mon, 19 Jan 2026 00:00:00 +0800</pubDate><guid>https://tonybai.com/2026/01/19/unleashing-the-go-toolchain/</guid><description>本文永久链接 – https://tonybai.com/2026/01/19/unleashing-the-go-toolchain 大家好，我是Tony Bai。 “Go 语言以简洁著称，但在可观测性（Observability）领域，这种简洁有时却是一种负担。手动埋点、繁琐的初始化代码、版本升级带来的破坏性变更……这些都让 Gopher 们痛苦不已。 可观测性的三大支柱 相比之下，Java ...</description></item><item><title>AI 还在写“老式 Go”？Alan Donovan 详解 Go 代码的现代化</title><link>https://tonybai.com/2025/12/22/alan-donovan-go-code-modernization/</link><pubDate>Mon, 22 Dec 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/12/22/alan-donovan-go-code-modernization/</guid><description>本文永久链接 – https://tonybai.com/2025/12/22/alan-donovan-go-code-modernization 大家好，我是Tony Bai。 “Go 承诺了兼容性，但这并不意味着我们应该永远停留在过去。” 在 GopherCon 2025 上，Go 团队核心成员、静态分析工具专家 Alan Donovan 带来了一场题为《Analysis and Trans...</description></item><item><title>dingo：Go 语言的 “TypeScript”时刻？—— 一场由社区驱动的语言演进实验</title><link>https://tonybai.com/2025/11/27/dingo-go-typescript-moment/</link><pubDate>Thu, 27 Nov 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/11/27/dingo-go-typescript-moment/</guid><description>本文永久链接 – https://tonybai.com/2025/11/27/dingo-go-typescript-moment 大家好，我是Tony Bai。 Go 语言自诞生以来，以其极简主义哲学（Simplicity）赢得了全球开发者的青睐。然而，这种极简也伴随着长期的痛点： * 满屏的 if err != nil。 * 缺失的和类型（Sum Types/Enums），导致状态表达含糊。...</description></item><item><title>告别字符串魔法：Go 迎来类型化 Struct Tag 提案，编译期安全触手可及？</title><link>https://tonybai.com/2025/07/08/typed-struct-tags/</link><pubDate>Tue, 08 Jul 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/07/08/typed-struct-tags/</guid><description>本文永久链接 – https://tonybai.com/2025/07/08/typed-struct-tags 大家好，我是Tony Bai。 Go 语言的结构体标签（Struct Tag）自诞生以来，一直是其强大反射能力的重要组成部分，广泛应用于 encoding/json、ORM、配置管理等领域。然而，它也一直是一个“美丽的缺憾”：这些标签本质上是无类型的字符串，依赖于各种“微语言”和“纳...</description></item><item><title>通过实例理解Go内联优化</title><link>https://tonybai.com/2022/10/17/understand-go-inlining-optimisations-by-example/</link><pubDate>Mon, 17 Oct 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/10/17/understand-go-inlining-optimisations-by-example/</guid><description>本文永久链接 – https://tonybai.com/2022/10/17/understand-go-inlining-optimisations-by-example * * * 移动互联网时代，直面C端用户的业务系统规模一般都很庞大，系统消耗的机器资源也很可观，系统使用的CPU核数、内存都是在消耗公司的真金白银。在服务水平不下降的前提下尽量降低单服务实例的资源消耗，即我们俗称的“少吃草多...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第五部分）：错误处理</title><link>https://tonybai.com/2022/05/30/an-example-of-implement-dsl-using-antlr-and-go-part5/</link><pubDate>Mon, 30 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/30/an-example-of-implement-dsl-using-antlr-and-go-part5/</guid><description>本文永久链接 – https://tonybai.com/2022/05/30/an-example-of-implement-dsl-using-antlr-and-go-part5 无论是端应用还是云应用，要上生产环境，有一件事必须要做好，那就是**错误处理**。在本系列前面的文章中，我们设计了文法与语法、建立并验证了语义模型，但我们没有特别关注错误处理。在这一篇中，我们就来补上这个环节。 D...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第四部分）：组装语义模型并测试DSL</title><link>https://tonybai.com/2022/05/28/an-example-of-implement-dsl-using-antlr-and-go-part4/</link><pubDate>Sat, 28 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/28/an-example-of-implement-dsl-using-antlr-and-go-part4/</guid><description>本文永久链接 – https://tonybai.com/2022/05/28/an-example-of-implement-dsl-using-antlr-and-go-part4 在上一篇文章中，我们为DSL建立了完整的语义模型，我们距离DSL的语法示例真正run起来还差最后一步，那就是基于语法树提取信息(逆波兰式)、组装语义模型，在加载语义模型并实例化各个规则处理器(processor)后...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第三部分）：建立和验证语义模型</title><link>https://tonybai.com/2022/05/27/an-example-of-implement-dsl-using-antlr-and-go-part3/</link><pubDate>Fri, 27 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/27/an-example-of-implement-dsl-using-antlr-and-go-part3/</guid><description>本文永久链接 – https://tonybai.com/2022/05/27/an-example-of-implement-dsl-using-antlr-and-go-part3 在前面的系列文章中，我们为气象学家们设计了一门名为**Tdat**的DSL，使用ANTLR的文法规则编写了Tdat的文法，基于该文法生成了Tdat的语法解析器代码并初步验证了文法的正确性，Tdat可以成功将我们编写...</description></item><item><title>手把手教你使用ANTLR和Go实现一门DSL语言（第一部分）：设计DSL语法与文法</title><link>https://tonybai.com/2022/05/24/an-example-of-implement-dsl-using-antlr-and-go-part1/</link><pubDate>Tue, 24 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/24/an-example-of-implement-dsl-using-antlr-and-go-part1/</guid><description>本文永久链接 – https://tonybai.com/2022/05/24/an-example-of-implement-dsl-using-antlr-and-go-part1 在《使用ANTLR和Go实现DSL入门》一文中，我们了解了DSL与通用编程语言(GPL)的差异、DSL解析器生成工具选择以及ANTLR文法的简要书写规则，并和大家一起完成了一个CSV解析器的例子。看完上述文章后，你...</description></item><item><title>使用ANTLR和Go实现DSL入门</title><link>https://tonybai.com/2022/05/10/introduction-of-implement-dsl-using-antlr-and-go/</link><pubDate>Tue, 10 May 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/05/10/introduction-of-implement-dsl-using-antlr-and-go/</guid><description>本文永久链接 – https://tonybai.com/2022/05/10/introduction-of-implement-dsl-using-antlr-and-go 一. 引子 设计与实现一门像Go这样的通用编程语言的确很难！那是世界上少数程序员从事的事业，但是实现一门领域特定语言(Domain Specific Language, DSL)似乎是可行的。 就像著名的语言解析器生成工具...</description></item><item><title>使用functrace辅助进行Go项目源码分析</title><link>https://tonybai.com/2021/06/04/go-source-analysis-with-functrace/</link><pubDate>Fri, 04 Jun 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/06/04/go-source-analysis-with-functrace/</guid><description>本文永久链接 – https://tonybai.com/2021/06/04/go-source-analysis-with-functrace 在《像跟踪分布式服务调用那样跟踪Go函数调用链》一文中，我们介绍了一种跟踪函数调用链的思路，并给出了一种实现functrace：https://github.com/bigwhite/functrace。这个小工具不仅仅是分享给大家的，我自己在工作和学...</description></item><item><title>通过实例理解Go逃逸分析</title><link>https://tonybai.com/2021/05/24/understand-go-escape-analysis-by-example/</link><pubDate>Mon, 24 May 2021 00:00:00 +0800</pubDate><guid>https://tonybai.com/2021/05/24/understand-go-escape-analysis-by-example/</guid><description>本文永久链接 – https://tonybai.com/2021/05/24/understand-go-escape-analysis-by-example 翻看了一下自己的Go文章归档，发现自己从未专门写过有关Go逃逸分析（escape analysis）的文章。关于Go变量的逃逸分析，大多数Gopher其实并不用关心，甚至可以无视。但是如果你将Go应用于性能敏感的领域，要完全压榨出Go应用...</description></item><item><title>Go函数调用链跟踪的一种实现思路</title><link>https://tonybai.com/2020/12/10/a-kind-of-thinking-about-how-to-trace-function-call-chain/</link><pubDate>Thu, 10 Dec 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/12/10/a-kind-of-thinking-about-how-to-trace-function-call-chain/</guid><description>这篇文章的初衷是想解答知乎上的一位知友提出的问题。没想到完成一种实现后，这个问题居然被删除了。那么既然实现了，就分享出来吧。问题的原文找不到了，问题大致是这样的： 一个程序中存在多个函数调用链都调用了函数D： A1 -&amp;gt; B1 &amp;gt; C1 -&amp;gt; D A2 -&amp;gt; B2 &amp;gt; C2 -&amp;gt; D A3 -&amp;gt; B3 -&amp;gt; C3 -&amp;gt; D ... ... 那么，如果某次函数D被调用时出现了问题，那么怎么知道这个D...</description></item></channel></rss>