<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>tarao</author_name>
  <author_url>https://blog.hatena.ne.jp/tarao/</author_url>
  <blog_title>貳佰伍拾陸夜日記</blog_title>
  <blog_url>https://tarao.hatenablog.com/</blog_url>
  <categories>
    <anon>lang</anon>
    <anon>scala</anon>
    <anon>article</anon>
  </categories>
  <description>この記事はScala Advent Calendar 2022の19日目です.Scalaではジェネリック型の変性(variance)は+や-で指定しますが, 他の言語(たとえば, C#, Kotlin)ではoutやinだったりします. この記事では変性の意味を整理して, なぜScalaでは+/-の記号を使うのか説明します.追記ただし, ここで説明している内容は基本的にC#やKotlinでも成立する(はずな)ので「なぜこれらの言語では+/-の記号を使わないのか」を説明するものではありません. 個人的には+/-の方がわかりやすいと思うし, out/inの記法は扱っている概念が簡単であるかのような誤…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftarao.hatenablog.com%2Fentry%2Fsubtyping-polarity&quot; title=&quot;部分型における変性と極性 - なぜScalaの変性は+や-で指定するのか - 貳佰伍拾陸夜日記&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://cdn-ak.f.st-hatena.com/images/fotolife/t/tarao/20221219/20221219115117.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2022-12-19 11:55:25</published>
  <title>部分型における変性と極性 - なぜScalaの変性は+や-で指定するのか</title>
  <type>rich</type>
  <url>https://tarao.hatenablog.com/entry/subtyping-polarity</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
