<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>Generics on TrustLang</title>
		<link>https://trust-lang.net/en/tags/generics/</link>
		<description>Recent content in Generics on TrustLang</description>
		<generator>Hugo</generator>
		<language>en</language>
		
		
		
		
			<lastBuildDate>Wed, 09 Sep 2026 15:37:53 +0300</lastBuildDate>
		
			<atom:link href="https://trust-lang.net/en/tags/generics/index.xml" rel="self" type="application/rss+xml" />
			<item>
				<title>Type system</title>
				<link>https://trust-lang.net/en/docs/types/concept/</link>
				<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/docs/types/concept/</guid>
				<description>&lt;h2 id=&#34;principles&#34;&gt;Principles&lt;a class=&#34;td-heading-self-link&#34; href=&#34;#principles&#34; aria-label=&#34;Heading self-link&#34;&gt;&lt;/a&gt;&lt;/h2&gt;&lt;p&gt;&lt;em&gt;TrustLang&lt;/em&gt; has a &lt;strong&gt;closed type system&lt;/strong&gt;: any new data type necessarily inherits&#xA;(extends) one of the already existing ones. This resembles the &lt;code&gt;Object&lt;/code&gt; model in Java, but without physical inheritance (without boxing simple types into objects).&#xA;This approach is the basis for &lt;a href=&#34;generics/&#34;&gt;generic programming&lt;/a&gt;, when a derived type inherits the set of operations of the &amp;ldquo;parent&amp;rdquo; type,&#xA;and continues to work with all its descendants.&lt;/p&gt;&#xA;&lt;p&gt;The language is dynamically typed: the type of a variable can be specified explicitly or left to automatic inference.&#xA;The specified type is used for compatibility checks on assignment, for checking the type of&#xA;a function&amp;rsquo;s return value and for controlling the placement in memory of &lt;a href=&#34;https://trust-lang.net/en/docs/types/native/&#34;&gt;native types&lt;/a&gt;.&#xA;Automatic casting is possible only between compatible types; otherwise an explicit&#xA;&lt;a href=&#34;type_system/&#34;&gt;type conversion&lt;/a&gt; is required.&lt;/p&gt;</description>
			</item>
			<item>
				<title>Generic programming in different languages</title>
				<link>https://trust-lang.net/en/blog/comparison/generics/</link>
				<pubDate>Tue, 24 Mar 2026 00:00:00 +0000</pubDate>
				<guid>https://trust-lang.net/en/blog/comparison/generics/</guid>
				<description>&lt;p&gt;Generic programming is a paradigm that allows describing algorithms and data structures in abstraction from concrete types. Despite the single concept, each language implements it in its own way: through templates, parametric polymorphism, type erasure or duck typing. This article provides a detailed analysis of the mechanisms of generic programming in eight languages - C++, Java, C#, Python, Rust, Haskell, TypeScript, Julia - with an assessment of the strengths and weaknesses of each approach and a comparative summary.&lt;/p&gt;</description>
			</item>
	</channel>
</rss>
