<?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/%E9%81%8D%E5%8E%86/</link><description>Recent content in 遍历 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Sat, 06 Sep 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E9%81%8D%E5%8E%86/index.xml" rel="self" type="application/rss+xml"/><item><title>告别算法“天书”，Go程序员的学术伪代码“翻译”指南</title><link>https://tonybai.com/2025/09/06/gopher-pseudocode-translation-guide/</link><pubDate>Sat, 06 Sep 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/09/06/gopher-pseudocode-translation-guide/</guid><description>本文永久链接 – https://tonybai.com/2025/09/06/gopher-pseudocode-translation-guide 大家好，我是Tony Bai。 你是否曾在阅读顶会论文时，感觉其中的算法描述像一本晦涩难懂的**“天书”**？那些看不太懂的数学符号、奇特的箭头和看似代码又无法编译的语句(如下图)，是不是常常让你望而却步，感叹理论与实践之间隔着一道鸿沟？ 别担心，...</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>手把手教你使用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>针对大型数组的迭代，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></channel></rss>