<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Any on PlumePHP</title><link>https://plumephp.com/tags/any/</link><description>Recent content in Any on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Thu, 13 Aug 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/any/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 1.18 any 类型：告别 interface{} 的冗长</title><link>https://plumephp.com/64-any-vs-interface/</link><pubDate>Sun, 10 Apr 2022 11:15:00 +0800</pubDate><guid>https://plumephp.com/64-any-vs-interface/</guid><description>&lt;h2 id="go-118-any-类型告别-interface-的冗长"&gt;Go 1.18 any 类型：告别 interface{} 的冗长&lt;/h2&gt;
&lt;p&gt;Go 1.18 引入了一个简单但意义重大的改进：&lt;code&gt;any&lt;/code&gt; 类型。它是 &lt;code&gt;interface{}&lt;/code&gt; 的内置别名，让代码更加简洁易读。虽然只是一个小的语法改进，但它体现了 Go 团队对开发者体验的持续关注。在这篇文章中，我们将深入探讨 &lt;code&gt;any&lt;/code&gt; 的本质、使用场景、与泛型的关系、性能差异以及迁移指南。&lt;/p&gt;</description></item></channel></rss>