<?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>Generics on Moises Vega</title><link>https://mvega.dev/tags/generics/</link><description>Recent content in Generics on Moises Vega</description><generator>Hugo</generator><language>en-us</language><copyright>Moises Vega</copyright><lastBuildDate>Sun, 16 Aug 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://mvega.dev/tags/generics/index.xml" rel="self" type="application/rss+xml"/><item><title>Why Go's Generics Rules Keep Loosening</title><link>https://mvega.dev/posts/go-generics-loosening/</link><pubDate>Sun, 16 Aug 2026 00:00:00 +0000</pubDate><guid>https://mvega.dev/posts/go-generics-loosening/</guid><description>&lt;p&gt;Notes from Naoki Kuroda&amp;rsquo;s GopherCon 2026 talk, &amp;ldquo;Loosening the Reins: Go
Generics Get More Flexible.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;The talk starts from one line in the Go 1.26 release notes:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"&gt;&lt;code class="language-go" data-lang="go"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;&lt;span style="color:#66d9ef"&gt;type&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Ordered&lt;/span&gt;[&lt;span style="color:#a6e22e"&gt;T&lt;/span&gt; &lt;span style="color:#a6e22e"&gt;Ordered&lt;/span&gt;[&lt;span style="color:#a6e22e"&gt;T&lt;/span&gt;]] &lt;span style="color:#66d9ef"&gt;interface&lt;/span&gt; { &lt;span style="color:#f92672"&gt;...&lt;/span&gt; }
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;A constraint that refers to itself. Go 1.25 rejected it as an invalid
recursive type; Go 1.26 accepts it. Kuroda went through the spec
history, issues, and the &lt;code&gt;go/types&lt;/code&gt; checker to find out what changed —
and the answer wasn&amp;rsquo;t &amp;ldquo;we found a clever fix.&amp;rdquo; The original rule had
simply been drawn wider than the problem it was guarding against.&lt;/p&gt;</description></item></channel></rss>