<?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>Scope on Tony Bai</title><link>https://tonybai.com/tags/scope/</link><description>Recent content in Scope on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Mon, 25 Aug 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/scope/index.xml" rel="self" type="application/rss+xml"/><item><title>Go的“七宗罪”：一篇“Go依然不够好”如何引爆社区激辩？</title><link>https://tonybai.com/2025/08/25/go-is-still-not-good/</link><pubDate>Mon, 25 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/25/go-is-still-not-good/</guid><description>本文永久链接 – https://tonybai.com/2025/08/25/go-is-still-not-good 大家好，我是Tony Bai。 在技术圈，平静的湖面下往往暗流涌动。对于Go语言社区而言，这股潜藏已久的暗流，被近期的一篇名为《Go is still not good》的博文彻底引爆。作者Thomas Habets，一位自称拥有超过十年Go使用经验的资深开发者，在他的这篇文章...</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 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><item><title>一个有关Golang变量作用域的坑</title><link>https://tonybai.com/2015/01/13/a-hole-about-variable-scope-in-golang/</link><pubDate>Tue, 13 Jan 2015 00:00:00 +0800</pubDate><guid>https://tonybai.com/2015/01/13/a-hole-about-variable-scope-in-golang/</guid><description>临近下班前编写和调试一段Golang代码，但运行结果始终与期望不符，怪异的很，下班前依旧无果。代码Demo如下： //testpointer.go package main import (         &amp;#34;fmt&amp;#34; ) var p \*int func foo() (\*int, error) {         var i int = 5         return &amp;amp;i, nil } f...</description></item></channel></rss>