<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>泛型 on PlumePHP</title><link>https://plumephp.com/tags/%E6%B3%9B%E5%9E%8B/</link><description>Recent content in 泛型 on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Wed, 18 Sep 2024 15:52:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/%E6%B3%9B%E5%9E%8B/index.xml" rel="self" type="application/rss+xml"/><item><title>Go 泛型集合入门：自己写 Set 和 Stack 时要注意什么</title><link>https://plumephp.com/go-generic-set-stack-2024/</link><pubDate>Wed, 18 Sep 2024 15:52:00 +0800</pubDate><guid>https://plumephp.com/go-generic-set-stack-2024/</guid><description>&lt;p&gt;Go 有了泛型以后，很多人第一反应是写集合库。虽然实际项目里不要急着造大而全的数据结构库，但写一个小 &lt;code&gt;Set&lt;/code&gt; 和 &lt;code&gt;Stack&lt;/code&gt; 很适合理解泛型：类型参数怎么写，&lt;code&gt;comparable&lt;/code&gt; 是什么，方法接收者怎么设计，零值能不能直接用。&lt;/p&gt;</description></item></channel></rss>