<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Covariance on PlumePHP</title><link>https://plumephp.com/tags/covariance/</link><description>Recent content in Covariance on PlumePHP</description><generator>Hugo</generator><language>zh-CN</language><lastBuildDate>Sun, 27 Sep 2026 10:00:00 +0800</lastBuildDate><atom:link href="https://plumephp.com/tags/covariance/index.xml" rel="self" type="application/rss+xml"/><item><title>Scala 类型系统实战：泛型、ADT、协变逆变与类型类</title><link>https://plumephp.com/scala-type-system/</link><pubDate>Sun, 27 Sep 2026 10:00:00 +0800</pubDate><guid>https://plumephp.com/scala-type-system/</guid><description>&lt;h2 id="引言"&gt;引言&lt;/h2&gt;
&lt;p&gt;Scala 类型系统是 JVM 上最强类型系统之一，也是「为什么写 Scala 不容易出错」的底气。它允许你用&lt;strong&gt;类型本身来表达领域约束&lt;/strong&gt;：&lt;code&gt;Option[Int]&lt;/code&gt; 告诉你「可能没有值」、&lt;code&gt;Either[String, Order]&lt;/code&gt; 告诉你「失败带原因」、case class 建模出的 ADT 让非法状态根本编译不过。&lt;/p&gt;</description></item></channel></rss>