<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://coderwiki.org/index.php?action=history&amp;feed=atom&amp;title=Static_typing</id>
	<title>Static typing - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://coderwiki.org/index.php?action=history&amp;feed=atom&amp;title=Static_typing"/>
	<link rel="alternate" type="text/html" href="http://coderwiki.org/index.php?title=Static_typing&amp;action=history"/>
	<updated>2026-05-19T03:45:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.0</generator>
	<entry>
		<id>http://coderwiki.org/index.php?title=Static_typing&amp;diff=81&amp;oldid=prev</id>
		<title>Dylan: info, type inference</title>
		<link rel="alternate" type="text/html" href="http://coderwiki.org/index.php?title=Static_typing&amp;diff=81&amp;oldid=prev"/>
		<updated>2025-08-12T21:25:17Z</updated>

		<summary type="html">&lt;p&gt;info, type inference&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;One of the ways we can group together [[Programming language|programming languages]] is with these two groups:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Statically-typed&amp;#039;&amp;#039;&amp;#039; programming languages&lt;br /&gt;
* [[Dynamic typing|&amp;#039;&amp;#039;&amp;#039;Dynamically-typed&amp;#039;&amp;#039;&amp;#039; programming languages]]&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;Static&amp;#039;&amp;#039; typing is where we explicitly give every [[variable]] and [[field]] a [[data type]].&lt;br /&gt;
&lt;br /&gt;
== [[Type inference]] ==&lt;br /&gt;
Sometimes, it is possible for the [[compiler]] or [[interpreter]] to &amp;#039;guess&amp;#039; the [[data type]] of a [[variable]].&lt;br /&gt;
&lt;br /&gt;
This doesn&amp;#039;t mean it has &amp;#039;&amp;#039;&amp;#039;no [[Data type|type]]&amp;#039;&amp;#039;&amp;#039; (it&amp;#039;s not [[Dynamic typing|dynamic]]), it&amp;#039;s just that we don&amp;#039;t have to explicitly mention the type. The [[variable]] still has a [[Data type|type]], and we can&amp;#039;t [[Assignment|overwrite]] it with a value of a different [[data type]].&lt;br /&gt;
&lt;br /&gt;
For example, this code in [[C]] will make &amp;lt;code&amp;gt;x&amp;lt;/code&amp;gt; an [[integer]], even though we don&amp;#039;t specifically mention it:&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
auto x = 17;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The code above is internally translated to:&amp;lt;syntaxhighlight lang=&amp;quot;c&amp;quot;&amp;gt;&lt;br /&gt;
int x = 17;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;The [[C auto|C auto keyword]] is not the cleanest way of doing [[type inference]]. In Rust, variables are declared using the [[Rust let|let keyword]], and you can optionally specify a type &amp;#039;&amp;#039;on top of that&amp;#039;&amp;#039;.&lt;/div&gt;</summary>
		<author><name>Dylan</name></author>
	</entry>
</feed>