<?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>Builtin on Tony Bai</title><link>https://tonybai.com/tags/builtin/</link><description>Recent content in Builtin on Tony Bai</description><generator>Hugo</generator><language>zh-cn</language><copyright>2004-2026 Tony Bai. 版权所有.</copyright><lastBuildDate>Sun, 17 Aug 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://tonybai.com/tags/builtin/index.xml" rel="self" type="application/rss+xml"/><item><title>从 Rob Pike 的提案到社区共识：Go 或将通过 new(v) 彻底解决指针初始化难题</title><link>https://tonybai.com/2025/08/17/create-pointer-to-simple-types/</link><pubDate>Sun, 17 Aug 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/08/17/create-pointer-to-simple-types/</guid><description>本文永久链接 – https://tonybai.com/2025/08/17/create-pointer-to-simple-types 大家好，我是Tony Bai。 在 Go 中创建一个指向基本类型（如 int 或 string）的指针，为何比创建一个指向结构体的指针更繁琐？这个长期存在的“人体工程学”问题，由 Go 语言的共同创造者之一 **Rob Pike** 在提案 #45624 中...</description></item><item><title>11个现代Go特性：用gopls/modernize让你的代码焕然一新</title><link>https://tonybai.com/2025/04/15/embrace-modern-go-style-with-gopls-modernize/</link><pubDate>Tue, 15 Apr 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/04/15/embrace-modern-go-style-with-gopls-modernize/</guid><description>本文永久链接 – https://tonybai.com/2025/04/15/embrace-modern-go-style-with-gopls-modernize 大家好，我是Tony Bai。 最近在思考Go语言的发展时，不禁让我想起了当年学习C++的经历。Bjarne Stroustrup在《C++程序设计语言（特别版）》中就专门强调了“现代 C++”（Modern C++）的编程风格，...</description></item><item><title>Go 1.25规范大扫除：移除“Core Types”，为更灵活的泛型铺路</title><link>https://tonybai.com/2025/03/27/remove-coretypes-from-go-spec/</link><pubDate>Thu, 27 Mar 2025 00:00:00 +0800</pubDate><guid>https://tonybai.com/2025/03/27/remove-coretypes-from-go-spec/</guid><description>Go 1.25规范大扫除：移除“Core Types”，为更灵活的泛型铺路 - Tony Bai =============== Tony Bai 一个程序员的心路历程 * Google Go语言编码风格规范 * Google Go语言编码风格规范：指南篇 * Google Go语言编码风格规范：决定篇 * Google Go语言编码风格规范：最佳实践篇 * Go语言第一课FAQ * Go语言进阶...</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>当函数设计遇到切片</title><link>https://tonybai.com/2022/10/27/when-encountering-slice-during-function-design/</link><pubDate>Thu, 27 Oct 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/10/27/when-encountering-slice-during-function-design/</guid><description>本文永久链接 – https://tonybai.com/2022/10/27/when-encountering-slice-during-function-design 切片(slice)是Go语言中的一种重要的也是最常用的同构数据类型。在Go语言编码过程中，我们多数情况下会使用slice替代数组，一来是因为其动态可扩展，二来在多数场合传递slice的开销要比传递数组要小(这里有一些例外)。 ...</description></item><item><title>len(s)表达式的求值结果究竟是常量还是变量？我来告诉你</title><link>https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable/</link><pubDate>Thu, 24 Mar 2022 00:00:00 +0800</pubDate><guid>https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable/</guid><description>本文永久链接 – https://tonybai.com/2022/03/24/the-result-of-a-len-expression-is-constant-or-variable **len**是Go预定义标识符，同时也是Go内置的预定义函数，通过go doc工具我们能查到len函数的doc如下： ``` $go doc builtin.len package builtin // im...</description></item><item><title>一文告诉你神奇的Go内建函数源码在哪里</title><link>https://tonybai.com/2020/12/17/where-is-the-source-of-builtin-functions/</link><pubDate>Thu, 17 Dec 2020 00:00:00 +0800</pubDate><guid>https://tonybai.com/2020/12/17/where-is-the-source-of-builtin-functions/</guid><description>&amp;gt; Go内建函数源码，我好像在哪里见过你。 – 佚名 1\. 何为Go内建函数 众所周知，Go是最简单的主流编程语言之一，截至Go 1.15版本，Go语言的关键字的规模依旧保持在25个： 很多刚入门的gopher可能会问：像bool、byte、error、true、iota甚至int都难道都不是关键字？没错！和其他语言不同，这些**标识符**并不是关键字，在Go中它们被称为**预定义标识符**。这...</description></item></channel></rss>