<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Programming Learning on Mi&amp;Bee Blog</title><link>/en/categories/programming-learning/</link><description>Recent content in Programming Learning on Mi&amp;Bee Blog</description><generator>Hugo -- gohugo.io</generator><language>en</language><managingEditor>蓝宝石的傻话</managingEditor><lastBuildDate>Fri, 26 Jun 2026 15:40:00 +0800</lastBuildDate><atom:link href="/en/categories/programming-learning/rss.xml" rel="self" type="application/rss+xml"/><item><title>Why Zig: A New Systems Language from a Go/Rust Perspective</title><link>/en/posts/programming/zig-why-and-setup/</link><pubDate>Sun, 21 Jun 2026 09:15:00 +0800</pubDate><guid>/en/posts/programming/zig-why-and-setup/</guid><description>&lt;p&gt;This article is based on Zig 0.16 (released 2026-04-13, the latest stable release). Zig is a rapidly evolving modern systems programming language. Its source repository has moved from GitHub to &lt;a href="https://codeberg.org/ziglang/zig"&gt;Codeberg&lt;/a&gt;, and the official download page is at &lt;a href="https://ziglang.org/download/"&gt;ziglang.org/download/&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id="why-zig"&gt;Why Zig?&lt;/h2&gt;
&lt;p&gt;If you already know Go and Rust, you might ask: why look at a third systems language? The answer is simple: &lt;strong&gt;Zig fills the gap between Go and Rust&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Go conquered backend and cloud-native development with its low barrier to entry and high productivity. But its garbage collector (GC) and relatively large runtime become liabilities in low-level systems programming, embedded systems, and real-time scenarios. Rust delivers peak performance and safety through zero-cost abstractions and its ownership system, but its steep learning curve and slow compile times make it feel &amp;ldquo;heavy&amp;rdquo; for fast prototyping and small tools.&lt;/p&gt;</description></item><item><title>Basic Syntax: Ramp Up on Zig with Your Go/Rust Experience</title><link>/en/posts/programming/zig-basic-syntax/</link><pubDate>Mon, 22 Jun 2026 14:30:00 +0800</pubDate><guid>/en/posts/programming/zig-basic-syntax/</guid><description>&lt;p&gt;&lt;em&gt;This article is based on Zig 0.16.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;In Part 1 we discussed why Zig is worth learning and how to run your first Hello World. Now it&amp;rsquo;s time to dive into the syntax—variables, types, control flow, functions, and generics. The single goal is to &lt;strong&gt;make you able to read and write Zig code&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you have Go or Rust experience, none of these concepts will feel entirely new. I&amp;rsquo;ll draw comparisons at key points to help you map your existing knowledge.&lt;/p&gt;</description></item><item><title>Error Handling: A Third Way Beyond Go and Rust</title><link>/en/posts/programming/zig-error-handling/</link><pubDate>Tue, 23 Jun 2026 10:45:00 +0800</pubDate><guid>/en/posts/programming/zig-error-handling/</guid><description>&lt;p&gt;This article is based on Zig 0.16.&lt;/p&gt;
&lt;h2 id="three-error-handling-paradigms"&gt;Three Error Handling Paradigms&lt;/h2&gt;
&lt;p&gt;Error handling is one of the most debated topics in programming language design. Go&amp;rsquo;s multiple return values, Rust&amp;rsquo;s &lt;code&gt;Result&amp;lt;T, E&amp;gt;&lt;/code&gt; enum, and Zig&amp;rsquo;s error union type represent three fundamentally different philosophies. This article assumes you have Go or Rust experience and uses that as a reference frame to understand Zig&amp;rsquo;s design.&lt;/p&gt;
&lt;h3 id="go-multi-return--if-err--nil"&gt;Go: Multi-return + if err != nil&lt;/h3&gt;
&lt;p&gt;Go&amp;rsquo;s philosophy is &amp;ldquo;explicit over implicit&amp;rdquo; — functions can return multiple values, and the convention is that the last return value is &lt;code&gt;error&lt;/code&gt;. Every call site must handle it:&lt;/p&gt;</description></item><item><title>Zig Memory Management: The Explicit Allocator Pattern</title><link>/en/posts/programming/zig-memory-allocators/</link><pubDate>Wed, 24 Jun 2026 16:20:00 +0800</pubDate><guid>/en/posts/programming/zig-memory-allocators/</guid><description>&lt;p&gt;This article is based on Zig 0.16.&lt;/p&gt;
&lt;p&gt;In the previous articles we covered Zig&amp;rsquo;s basic syntax and error handling. Now we arrive at the most distinctive part of Zig—&lt;strong&gt;memory management&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If you come from Go or Rust, Zig&amp;rsquo;s memory philosophy will feel unfamiliar: it provides neither garbage collection nor an ownership system. Instead, it chooses a fundamentally different path—the &lt;strong&gt;Allocator Pattern&lt;/strong&gt;. The core convention is remarkably simple, yet far-reaching:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Any function that might allocate memory must accept a &lt;code&gt;std.mem.Allocator&lt;/code&gt; parameter.&lt;/p&gt;</description></item><item><title>Zig Standard Library, the I/O Interface, and Concurrency: Tying It All Together</title><link>/en/posts/programming/zig-stdlib-io-concurrency/</link><pubDate>Fri, 26 Jun 2026 15:40:00 +0800</pubDate><guid>/en/posts/programming/zig-stdlib-io-concurrency/</guid><description>&lt;p&gt;This article is based on Zig 0.16.&lt;/p&gt;
&lt;p&gt;After five installments covering syntax, error handling, memory management, compile-time computation, and the build system — we&amp;rsquo;ve arrived at the finale. Time to tie it all together.&lt;/p&gt;
&lt;p&gt;Version 0.16 is a convergence point of two major changes: the &lt;strong&gt;Unmanaged migration&lt;/strong&gt; of standard library containers, and the introduction of the revolutionary &lt;strong&gt;std.Io interface&lt;/strong&gt;. These transformations deeply affect how Zig code is written. This article explores both, closes with three-language comparison cases, and provides a learning roadmap and resources.&lt;/p&gt;</description></item></channel></rss>