<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
    <title>Nick Salvatore</title>
    <link rel="self" type="application/atom+xml" href="https://nmsalvatore.com/atom.xml"/>
    <link rel="alternate" type="text/html" href="https://nmsalvatore.com"/>
    <generator uri="https://www.getzola.org/">Zola</generator>
    <updated>2026-05-21T00:00:00+00:00</updated>
    <id>https://nmsalvatore.com/atom.xml</id>
    <entry xml:lang="en">
        <title>A Year of Zig ⚡</title>
        <published>2026-05-21T00:00:00+00:00</published>
        <updated>2026-05-21T00:00:00+00:00</updated>
        
        <author>
          <name>
            
              Nick Salvatore
            
          </name>
        </author>
        
        <link rel="alternate" type="text/html" href="https://nmsalvatore.com/a-year-of-zig/"/>
        <id>https://nmsalvatore.com/a-year-of-zig/</id>
        
        <content type="html" xml:base="https://nmsalvatore.com/a-year-of-zig/">&lt;p&gt;I&#x27;ve decided to commit to learning Zig for the next year or so. The rationale is pretty simple: I want to work in a language that allows me to build real software without unnecessary headaches but also forces me to learn how computers really work and what high-level languages abstract away.&lt;&#x2F;p&gt;
&lt;p&gt;I just got started yesterday, reading Chapter 1 of &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;pedropark99.github.io&#x2F;zig-book&quot;&gt;Introduction to Zig ↗&lt;&#x2F;a&gt; and tackling the &lt;a rel=&quot;external&quot; href=&quot;https:&#x2F;&#x2F;exercism.org&#x2F;tracks&#x2F;zig&#x2F;exercises&#x2F;hello-world&quot;&gt;Hello World ↗&lt;&#x2F;a&gt; exercise on Exercism. Hello World exercises usually feel like a joke, especially on Exercism. They hand you a function that says &quot;Goodbye, Mars!&quot; and you modify the text to say &quot;Hello, World!&quot; Run the tests. Pass. Done. And to be clear, that&#x27;s exactly what the Zig exercise was, but there was enough unfamiliarity in the function signature for me to pause and dig into it more.&lt;&#x2F;p&gt;
&lt;p&gt;The point of this post isn&#x27;t to educate, but to illustrate my
point briefly—and it&#x27;s a dumb point—here&#x27;s the &lt;code&gt;hello()&lt;&#x2F;code&gt; function:&lt;&#x2F;p&gt;
&lt;pre&gt;&lt;code data-lang=&quot;zig&quot;&gt;pub fn hello() []const u8 {
    return &amp;quot;Hello, World!&amp;quot;;
}
&lt;&#x2F;code&gt;&lt;&#x2F;pre&gt;
&lt;p&gt;Coming from Python and Go, if I return a string in a function, my return type is something like &lt;code&gt;str&lt;&#x2F;code&gt; or &lt;code&gt;string&lt;&#x2F;code&gt;, not &lt;code&gt;[]const u8&lt;&#x2F;code&gt;. I looked up what a &lt;code&gt;u8&lt;&#x2F;code&gt; type is: unsigned 8-bit integer. So the return type is a slice of &lt;code&gt;const&lt;&#x2F;code&gt; (?) of unsigned 8-bit integers. Why would a slice of integers be the return type for a string? Why &lt;code&gt;const&lt;&#x2F;code&gt;? I wrote the questions I had down, then researched until I could answer each one. As I said, the point of this isn&#x27;t to explain all of this. The point is that this is the first Hello World exercise I&#x27;ve encountered where I wasn&#x27;t just learning about language-specific syntax to make a program do what I want it to do. Obviously, Zig is not alone in this, but it nevertheless excited me to have a simple exercise push me deeper into the computer.&lt;&#x2F;p&gt;
&lt;p&gt;So yeah, I&#x27;m looking forward to this next year.&lt;&#x2F;p&gt;
</content>
        
    </entry>
</feed>
