<?xml version="1.0" encoding='utf-8'?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card id="card1" title="Zig (programming language) - Page 18 - Wikipedia">
<p>
<a accesskey="1" href="page.php?w=Zig_(programming_language)&amp;p=17">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Zig_%28programming_language%29&amp;p=19">3.Next</a>
</p>
<p>and <a href="page.php?w=conditional_compilation">conditional compilation</a> without the need for a separate <a href="page.php?w=preprocessor">preprocessor</a> language.</p>

<p>During compile time, types become <a href="page.php?w=first-class_citizen">first-class citizen</a>s. This enables compile-time <a href="page.php?w=duck_typing">duck typing</a>, and is how Zig implements generic types.</p>

<p>For instance, in Zig, a generic <a href="page.php?w=linked_list">linked list</a> type might be implemented using a function like:<syntaxhighlight lang="zig">fn LinkedList(comptime T: type) type;</syntaxhighlight>This</p><p>
<a accesskey="1" href="page.php?w=Zig_(programming_language)&amp;p=17">1.Previous</a><br />
<a accesskey="3" href="page.php?w=Zig_%28programming_language%29&amp;p=19">3.Next</a>
</p>

<do type="prev" label="Search">
        <go href="search.wml"/>
</do>

</card>
</wml>
