<?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/%E5%85%A8%E5%B1%80%E4%BB%A3%E7%A0%81%E5%9D%97/</link><description>Recent content in 全局代码块 on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Fri, 11 May 2018 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/%E5%85%A8%E5%B1%80%E4%BB%A3%E7%A0%81%E5%9D%97/index.xml" rel="self" type="application/rss+xml"/><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>