<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
  <title>Zena Blog</title>
  <subtitle>Zena is a statically typed language that compiles to small, fast WebAssembly GC binaries, with a familiar syntax and a sound type system.</subtitle>
  <link href="https://zena-lang.dev/blog/feed.xml" rel="self" type="application/atom+xml"/>
  <link href="https://zena-lang.dev/blog/" rel="alternate" type="text/html"/>
  <id>https://zena-lang.dev/blog/</id>
  <updated>2026-10-01T15:00:00.000Z</updated>
  <rights>Copyright © 2026 Zena contributors</rights>
  <generator uri="https://www.11ty.dev/">Eleventy</generator>
  <entry>
    <title>Zena Project Update #2: Self-Hosted CLI, Language Server, WASI 0.3, and Ranges</title>
    <link href="https://zena-lang.dev/blog/2026/10/project-update-2/" rel="alternate" type="text/html"/>
    <id>https://zena-lang.dev/blog/2026/10/project-update-2/</id>
    <published>2026-10-01T15:00:00.000Z</published>
    <updated>2026-10-01T15:00:00.000Z</updated>
    <author>
      <name>Justin Fagnani</name>
      <uri>https://github.com/justinfagnani</uri>
    </author>
    <summary type="html">Our second project update covers moving the zena command line into Zena itself, adding the stdio language server (zena lsp), adopting WASI 0.3, range iteration and slicing, and compiler bug fixes.</summary>
    <content type="html">&lt;p&gt;Welcome to &lt;strong&gt;Zena Project Update #2&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Following last week&#39;s update, this post covers development since September 25:
rewriting the &lt;code&gt;zena&lt;/code&gt; CLI in Zena, adding a standard I/O language server,
migrating to WASI 0.3, supporting range iteration and array slicing, and landing
a set of compiler and type checker fixes.&lt;/p&gt;
&lt;h2 id=&quot;1-self-hosted-cli-zena&quot; tabindex=&quot;-1&quot;&gt;1. Self-Hosted CLI (&lt;code&gt;zena&lt;/code&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;#1-self-hosted-cli-zena&quot; aria-label=&quot;Permalink to &amp;quot;1-self-hosted-cli-zena&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The &lt;code&gt;zena&lt;/code&gt; command-line tool is now a Zena program
(&lt;code&gt;packages/zena-cli/zena/main.zena&lt;/code&gt;) compiled to WebAssembly. The native
&lt;code&gt;zena-cli&lt;/code&gt; executable is a thin Rust host (~100 lines) that configures
filesystem preopens, enables process spawning, and calls &lt;code&gt;main&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;The CLI module links the compiler, build orchestrator (&lt;code&gt;zb&lt;/code&gt;), doc generator
(&lt;code&gt;zenadoc&lt;/code&gt;), and code formatter (&lt;code&gt;zena-formatter&lt;/code&gt;) in-process:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena build&lt;/code&gt;&lt;/strong&gt;: Compiles Zena modules in-process using &lt;code&gt;compileFile&lt;/code&gt;. Wireit
targets can be run via &lt;code&gt;zena build &amp;lt;target&amp;gt;&lt;/code&gt; with &lt;code&gt;zb&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena run&lt;/code&gt;&lt;/strong&gt;: Compiles and executes programs with &lt;code&gt;zena:wasm&lt;/code&gt;. Compilation
results are cached in Zena, tracking imported file sizes and modification
times to invalidate stale builds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena test&lt;/code&gt;&lt;/strong&gt;: Discovers test files with &lt;code&gt;zena:fs&lt;/code&gt; and executes them
concurrently across spawned instances of the CLI module via &lt;code&gt;zena:wasm&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena fmt&lt;/code&gt;&lt;/strong&gt;: Formats files with the Zena code formatter, supporting direct
stdout printing, in-place formatting with &lt;code&gt;--write&lt;/code&gt;, and verification with
&lt;code&gt;--check&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena bench&lt;/code&gt;&lt;/strong&gt;: Runs benchmark suites configured through &lt;code&gt;zena:bench&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;2-language-server-over-stdio-zena-lsp&quot; tabindex=&quot;-1&quot;&gt;2. Language Server over stdio (&lt;code&gt;zena lsp&lt;/code&gt;) &lt;a class=&quot;header-anchor&quot; href=&quot;#2-language-server-over-stdio-zena-lsp&quot; aria-label=&quot;Permalink to &amp;quot;2-language-server-over-stdio-zena-lsp&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The CLI now provides a Language Server Protocol server via &lt;code&gt;zena lsp&lt;/code&gt;,
communicating over standard I/O for editor integrations.&lt;/p&gt;
&lt;p&gt;Analysis logic was split into &lt;code&gt;@zena-lang/language-service&lt;/code&gt;, allowing &lt;code&gt;zena lsp&lt;/code&gt;
and the browser playground to share the same diagnostic and completion
implementation. In addition, syntax errors are now emitted as structured
diagnostics with file and source span locations.&lt;/p&gt;
&lt;h2 id=&quot;3-ranges-and-slicing&quot; tabindex=&quot;-1&quot;&gt;3. Ranges and Slicing &lt;a class=&quot;header-anchor&quot; href=&quot;#3-ranges-and-slicing&quot; aria-label=&quot;Permalink to &amp;quot;3-ranges-and-slicing&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Ranges now implement the &lt;code&gt;Iterable&lt;/code&gt; protocol, enabling iteration in &lt;code&gt;for-in&lt;/code&gt;
loops:&lt;/p&gt;
&lt;div class=&quot;language-zena adaptive-theme&quot;&gt;&lt;button title=&quot;Copy Code&quot; class=&quot;copy&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;zena&lt;/span&gt;&lt;pre class=&quot;shiki shiki-themes github-light github-dark code-block&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; i &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;  print&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(i);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In addition, &lt;code&gt;Array&amp;lt;T&amp;gt;&lt;/code&gt; now supports slicing via ranges:&lt;/p&gt;
&lt;div class=&quot;language-zena adaptive-theme&quot;&gt;&lt;button title=&quot;Copy Code&quot; class=&quot;copy&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;zena&lt;/span&gt;&lt;pre class=&quot;shiki shiki-themes github-light github-dark code-block&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; numbers &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; [&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;0&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;1&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;5&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;];&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; middle &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; numbers[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;..&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;4&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;]; &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;// [2, 3]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; tail &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; numbers[&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;3&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;..];    &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6A737D;--shiki-dark:#6A737D&quot;&gt;// [3, 4, 5]&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h2 id=&quot;4-wasi-03-and-component-model&quot; tabindex=&quot;-1&quot;&gt;4. WASI 0.3 and Component Model &lt;a class=&quot;header-anchor&quot; href=&quot;#4-wasi-03-and-component-model&quot; aria-label=&quot;Permalink to &amp;quot;4-wasi-03-and-component-model&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;WASI 0.3&lt;/strong&gt;: Moved component runtime imports and standard library integration
to WASI 0.3. Component binaries are smaller due to allocator simplification
(removing the pointer map) and a leaner event loop.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resource destructors&lt;/strong&gt;: The compiler and WIT parser now generate and
register destructors for resources that guest components provide.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Parameter spilling&lt;/strong&gt;: Added Canonical ABI parameter spilling for functions
whose signatures exceed core-value thresholds (16 values for synchronous
functions, 4 for asynchronous functions), packing spilled arguments into
memory buffers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Synchronous export components&lt;/strong&gt;: Components exporting only synchronous
functions can omit asynchronous event loop machinery.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;5-standard-library-additions&quot; tabindex=&quot;-1&quot;&gt;5. Standard Library Additions &lt;a class=&quot;header-anchor&quot; href=&quot;#5-standard-library-additions&quot; aria-label=&quot;Permalink to &amp;quot;5-standard-library-additions&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Scoped cancellation&lt;/strong&gt;: Moved the &lt;code&gt;.cancel()&lt;/code&gt; capability from &lt;code&gt;CancelScope&lt;/code&gt;
to &lt;code&gt;TaskGroup&lt;/code&gt;. &lt;code&gt;CancelScope&lt;/code&gt; is now a read-only token (&lt;code&gt;isCancelled&lt;/code&gt;),
preventing child tasks from cancelling parent scopes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:json&lt;/code&gt;&lt;/strong&gt;: Added decoding for Unicode escapes (&lt;code&gt;&#92;uXXXX&lt;/code&gt;), &lt;code&gt;&#92;b&lt;/code&gt;, and
&lt;code&gt;&#92;f&lt;/code&gt;, path-based property lookups on &lt;code&gt;JsonObject&lt;/code&gt;, and serialization support
for parsed JSON trees.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:cli&lt;/code&gt; and &lt;code&gt;zena:process&lt;/code&gt;&lt;/strong&gt;: Added standard input reading via &lt;code&gt;zena:cli&lt;/code&gt;
and standard input writing for child processes via &lt;code&gt;zena:process&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:js&lt;/code&gt;&lt;/strong&gt;: Added &lt;code&gt;toPromise()&lt;/code&gt;, converting a Zena future into a JavaScript
promise in JS environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;String&lt;/code&gt;&lt;/strong&gt;: Added public &lt;code&gt;indexOf&lt;/code&gt;, &lt;code&gt;trim()&lt;/code&gt;, and &lt;code&gt;StringReader&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;6-compiler-and-type-system-fixes&quot; tabindex=&quot;-1&quot;&gt;6. Compiler and Type System Fixes &lt;a class=&quot;header-anchor&quot; href=&quot;#6-compiler-and-type-system-fixes&quot; aria-label=&quot;Permalink to &amp;quot;6-compiler-and-type-system-fixes&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Several bug fixes landed across the compiler and type system:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Interface overloads&lt;/strong&gt;: Added support for overloaded methods and operators on
interfaces, including read-by-index &lt;code&gt;[]&lt;/code&gt; slot resolution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Mixin resolution&lt;/strong&gt;: Resolved method lookups for mixins applied through other
mixins.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Array literal typing&lt;/strong&gt;: Mixed element types in array literals now infer
common union types.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Expression body adaptation&lt;/strong&gt;: Expression body values now adapt to match
declared return types.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Async main rooting&lt;/strong&gt;: Rooted the asynchronous runtime driver for &lt;code&gt;void&lt;/code&gt;
async &lt;code&gt;main&lt;/code&gt; entry points in declared worlds.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dead vtable slot pruning&lt;/strong&gt;: Retained method table slots only when a call
site can dispatch through them.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Single-comparison loop exits&lt;/strong&gt;: Lowered loop condition exits to a single
comparison.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Negative enum members&lt;/strong&gt;: Added support for negative integer values in enum
members.&lt;/li&gt;
&lt;/ul&gt;
</content>
  </entry>
  <entry>
    <title>Designing a Programming Language for the AI Era</title>
    <link href="https://zena-lang.dev/blog/2026/09/languages-for-the-ai-era/" rel="alternate" type="text/html"/>
    <id>https://zena-lang.dev/blog/2026/09/languages-for-the-ai-era/</id>
    <published>2026-09-29T18:00:00.000Z</published>
    <updated>2026-09-29T18:00:00.000Z</updated>
    <author>
      <name>Justin Fagnani</name>
      <uri>https://github.com/justinfagnani</uri>
    </author>
    <summary type="html">What makes a programming language effective when AI agents write, test, and review code, and why being optimized for WebAssembly is being optimized for AI.</summary>
    <content type="html">&lt;p&gt;Software engineering is rapidly adapting to an era where coding agents write,
edit, test, and review large parts of our codebases, in some cases the vast
majority of it. There are lots of opinions, experiments, and new tools up and
down the software development stack from version control, IDEs, agent
coordinators, sandboxes and VMs, debugging, and of course: programming
languages.&lt;/p&gt;
&lt;p&gt;The questions around programming languages are some of the most fundamental
about developer tools in the agentic era. I see a lot of very important, and
very unsettled topics, like:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What current languages are best for AI code generation?&lt;/li&gt;
&lt;li&gt;What would a programming language built for AI look like?&lt;/li&gt;
&lt;li&gt;Do programming languages even matter? Will future coding agents directly write
machine code?&lt;/li&gt;
&lt;li&gt;Have LLMs frozen the top programming languages in place because they dominate
existing training sets?&lt;/li&gt;
&lt;li&gt;Relatedly, do LLMs need to be trained on a large corpus of a language to be
good at generating it, or do their &amp;quot;universal translator&amp;quot; capabilities make up
for smaller training sets?&lt;/li&gt;
&lt;li&gt;Do coding agents make it easier to launch a new language by helping build out
its ecosystem?&lt;/li&gt;
&lt;li&gt;Do ecosystems even matter, or will every project generate every library it
needs, skipping dependencies and package managers completely?&lt;/li&gt;
&lt;li&gt;What is the role of humans in the developer loop, and how do we make humans
more effective in it?&lt;/li&gt;
&lt;li&gt;What does &amp;quot;ergonomics&amp;quot; mean for AIs versus humans?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These questions are circling around the whole software industry. A few writings
on the topic that have crossed my screens recently include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;José Valim&#39;s essay, &lt;a href=&quot;https://dashbit.co/blog/evolving-ai-era&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Evolving programming languages in the AI
era&lt;/a&gt;, on how tooling, guarantees, and
community collaboration shift when agents write code.&lt;/li&gt;
&lt;li&gt;An argument for &lt;a href=&quot;https://developers.googleblog.com/why-go-is-an-ideal-language-for-ai-assisted-software-engineering/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Why Go is an Ideal Language for AI-Assisted Software
Engineering&lt;/a&gt;,
from Google&#39;s Go team.&lt;/li&gt;
&lt;li&gt;Community debates on AI-optimized &lt;a href=&quot;https://www.reddit.com/r/ProgrammingLanguages/comments/1ldo2x2/programming_language_optimized_for_ai_code/&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;languages without syntactic
sugar&lt;/a&gt;,&lt;/li&gt;
&lt;li&gt;Unmesh Joshi&#39;s analyzsis of how &lt;a href=&quot;https://martinfowler.com/articles/llm-and-dsls.html&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;DSLs and domain
abstractions&lt;/a&gt; constrain LLM
code generation.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;These posts always have me critically comparing Zena to their theses, because
Zena was designed from its inception to be a great language for WebAssembly GC,
humans, &lt;em&gt;and&lt;/em&gt; for AI - I actually think these goals mostly overlap, and that
Zena is a great language for AI-driven development.&lt;/p&gt;
&lt;figure class=&quot;blog-post-figure&quot;&gt;
  &lt;img src=&quot;https://zena-lang.dev/images/blog/zena-ai-venn-diagram.svg&quot; alt=&quot;Venn diagram showing Zena at the intersection of Humans, AI, WebAssembly, and Compilers&quot; class=&quot;blog-post-image blog-post-diagram&quot; loading=&quot;lazy&quot; style=&quot;max-width: 600px; width: 100%; border: none; background: transparent;&quot; /&gt;
  &lt;figcaption class=&quot;blog-post-caption&quot;&gt;
    Zena at the intersection of humans, AI, compilers, and WebAssembly GC. This
    intersection probably deserves it&#39;s own blog post.
  &lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;So let&#39;s dive into these questions, look at what properties I think makes a
programming language effective for both human engineers and coding agents, and
explain why optimizing for WebAssembly is optimizing for AI.&lt;/p&gt;
&lt;h2 id=&quot;programming-languages-are-still-necessary&quot; tabindex=&quot;-1&quot;&gt;Programming languages are still necessary &lt;a class=&quot;header-anchor&quot; href=&quot;#programming-languages-are-still-necessary&quot; aria-label=&quot;Permalink to &amp;quot;programming-languages-are-still-necessary&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A recurring question is whether high-level programming languages will remain
necessary. If models can generate logic from natural language specifications,
will agents simply bypass compilers and emit assembly, WebAssembly text format
(WAT), or machine code directly?&lt;/p&gt;
&lt;p&gt;I don&#39;t think so. Low-level instructions lack domain abstractions, consume vast
numbers of output tokens, and bloat context windows. More importantly, software
development is iterative: code must be read back into context to be edited,
debugged, and reviewed. Reading flat assembly or unstructured byte sequences
back into a prompt strains model attention and makes reasoning about system state
far more difficult.&lt;/p&gt;
&lt;p&gt;Human understanding and auditing also remain essential. Software does not run in
a vacuum. Humans still need to inspect architecture, verify intent, audit
security boundaries, collaborate on changes, and take responsibility for the
systems. High-level languages remain the most effective medium for expressing,
sharing, and reasoning about computational logic.&lt;/p&gt;
&lt;h2 id=&quot;the-role-of-humans-and-the-meaning-of-ergonomics&quot; tabindex=&quot;-1&quot;&gt;The role of humans and the meaning of ergonomics &lt;a class=&quot;header-anchor&quot; href=&quot;#the-role-of-humans-and-the-meaning-of-ergonomics&quot; aria-label=&quot;Permalink to &amp;quot;the-role-of-humans-and-the-meaning-of-ergonomics&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;While Zena is designed to be an exceptional language for AI, it is fundamentally
a &lt;strong&gt;humanist project&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Zena is designed as the ideal language for me, personally, built on the belief
that humans will continue to play an active, meaningful role in software
development: reviewing changes, reading codebases, designing APIs, evaluating
trade-offs, and even coding by hand. An AI-first language that is unpleasant or
impenetrable for a human makes it too difficult for humans to be involved when
and where they need to.&lt;/p&gt;
&lt;p&gt;What does &lt;strong&gt;ergonomics&lt;/strong&gt; mean for an AI compared to a human? The core is largely
identical for both: clarity, predictability, and familiarity reduce cognitive
load for humans and attention dilution for models. Where humans and AIs diverge
is in scale, endurance, and tolerance for strictness. Humans often find strict
compiler ceremony annoying (or at least less fun), leading to the popularity of
dynamic languages with loose types and implicit coercions. Coding agents do not
experience annoyance; they handle strict, pedantic type checkers and explicit
annotations just fine.&lt;/p&gt;
&lt;p&gt;This informs my design philosophy: &lt;strong&gt;provide human-friendly syntax and
ergonomics, but lean strict and pedantic on compiler checks.&lt;/strong&gt; The strictness
protects the codebase, while the ergonomics ensure the code remains a pleasure
for humans to read and maintain.&lt;/p&gt;
&lt;h2 id=&quot;the-code-round-trip-problem&quot; tabindex=&quot;-1&quot;&gt;The code round-trip problem &lt;a class=&quot;header-anchor&quot; href=&quot;#the-code-round-trip-problem&quot; aria-label=&quot;Permalink to &amp;quot;the-code-round-trip-problem&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Until recently, code was written by a human, reviewed by another human, and read
by even more humans. Today, code cycles through AI repeatedly: an agent writes
code in one session, and subsequent sessions read and modify it. Just like with
humans, the code that AI writes becomes the context that AI reads.&lt;/p&gt;
&lt;p&gt;In a permissive language where static errors are deferred to runtime, sloppy
patterns compound. Conversely, when a language enforces strict types, explicit
invariants, and clean idioms, that structure compounds: every module committed
acts as high-signal context for future agent interactions, priming the model to
generate more disciplined, reliable code.&lt;/p&gt;
&lt;p&gt;The primary objective is to shift the burden of correctness from the LLM and
human eyes to automated tooling. Humans do not review high volumes of
AI-generated code reliably; attention fatigues, and subtle bugs pass through
unnoticed. The compiler must act as a deterministic filter so that human review
can focus on architecture, critical functions, tests, and pre- and
post-conditions.&lt;/p&gt;
&lt;h2 id=&quot;context-and-cognitive-load&quot; tabindex=&quot;-1&quot;&gt;Context and cognitive load &lt;a class=&quot;header-anchor&quot; href=&quot;#context-and-cognitive-load&quot; aria-label=&quot;Permalink to &amp;quot;context-and-cognitive-load&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Discussions of language design for LLMs often focus on token efficiency. One
view holds that languages should minimize token counts to lower inference costs.
Another argues that as inference costs fall and context windows grow, token
counts don&#39;t matter.&lt;/p&gt;
&lt;p&gt;Without being an AI researcher myself, I intuitively fall in the middle: raw
token price is only one part of the picture. LLMs suffer from degraded recall
and instruction-following as critical information is pushed further back in the
context. More importantly, an LLM spreads its attention across system
instructions, conversation history, tool calls, retrieved documentation,
codebase context, and its internal reasoning trace.&lt;/p&gt;
&lt;p&gt;Repetitive boilerplate consumes attention capacity that is otherwise available
for problem solving. Code that requires thirty lines of ceremony to express an
operation that conceptually takes two lines leaves less attention available for
reasoning about the problem at hand, architecture, and edge cases. In my
experience, model understandability aligns with human understandability: a
language with clear, regular semantics and concise and high-level syntax
preserves capacity for the actual problem at hand.&lt;/p&gt;
&lt;h2 id=&quot;has-language-evolution-ended&quot; tabindex=&quot;-1&quot;&gt;Has language evolution ended? &lt;a class=&quot;header-anchor&quot; href=&quot;#has-language-evolution-ended&quot; aria-label=&quot;Permalink to &amp;quot;has-language-evolution-ended&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A common concern in language design discussions today is that LLMs have frozen
the current top programming languages in place. If models are trained
predominantly on Python, TypeScript, Rust, and C++, won&#39;t any new language
suffer from poor model performance? Will Rust and TypeScript be the only
languages left?&lt;/p&gt;
&lt;p&gt;I personally don&#39;t believe language evolution has ended.&lt;/p&gt;
&lt;p&gt;First, current leaders each carry historical baggage and friction:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;TypeScript&lt;/strong&gt; offers familiar ergonomics and rapid web development, but it is
intentionally unsound. Features like &lt;code&gt;any&lt;/code&gt;, non-sound type assertions, and
permissive structural subtyping mean that subtle bugs and hallucinations pass
the compiler and surface only at runtime.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Rust&lt;/strong&gt; provides memory safety and sound type checking, but its borrow
checker introduces friction for models; its compilation times are notoriously
slow, stalling agent iteration loops; and it&#39;s harder for many humans to read
and review. Rust is not a simple looking language.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I think there is a lot of room for new languages that combine the ergonomics of
TypeScript with the soundness of Rust (plus many awesome ideas from Swift, Dart,
and Kotlin, and friends).&lt;/p&gt;
&lt;p&gt;Second, modern LLMs act as &lt;strong&gt;universal translators&lt;/strong&gt;. They do not need millions
of pre-existing examples of a specific language if that language&#39;s syntax and
semantics map cleanly onto concepts the model already understands.&lt;/p&gt;
&lt;p&gt;Zena leans heavily on universal translator abilities through deliberate
familiarity with popular, mainstream languages. The goal is to be able to fairly
accurately describe Zena with a super compact paragraph:&lt;/p&gt;
&lt;p&gt;&lt;em&gt;TypeScript syntax, Wasm GC aligned types, Dart constructors, Swift strings and
&lt;code&gt;let&lt;/code&gt;/&lt;code&gt;var&lt;/code&gt; mutability, Trio-style async cancellation, and Scala/Rust-style
sealed classes and pattern matching.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Because these patterns are already thoroughly represented in training data,
agents transfer-learn Zena&#39;s syntax immediately even without being in the
training set. And of course, this kind of familiarity is good for human learners
too!&lt;/p&gt;
&lt;h2 id=&quot;preventing-invalid-states-with-high-level-syntax&quot; tabindex=&quot;-1&quot;&gt;Preventing invalid states with high-level syntax &lt;a class=&quot;header-anchor&quot; href=&quot;#preventing-invalid-states-with-high-level-syntax&quot; aria-label=&quot;Permalink to &amp;quot;preventing-invalid-states-with-high-level-syntax&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A common hypothesis suggests that because models do not suffer from fatigue,
programming languages for AI should discard syntactic sugar and adopt minimal,
simplistic grammars.&lt;/p&gt;
&lt;p&gt;But this doesn&#39;t actually simplify software; it just shifts complexity from the
compiler into user code. When a language lacks expressiveness, the programmer or
agent must replace missing abstractions with repetitive boilerplate and manual
branching.&lt;/p&gt;
&lt;p&gt;Take patterns matching and ADTs. In Zena, they allows us to express valid state
spaces directly:&lt;/p&gt;
&lt;div class=&quot;language-zena adaptive-theme&quot;&gt;&lt;button title=&quot;Copy Code&quot; class=&quot;copy&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;zena&lt;/span&gt;&lt;pre class=&quot;shiki shiki-themes github-light github-dark code-block&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;sealed&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; class&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; ParseResult&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  case&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; Ok&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(doc: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;Document&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  case&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; Empty&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  case&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; Error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(message: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;String&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;, line: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;i32&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; outcome &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; match&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;parseDocument&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(input)) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  case&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; Ok&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {doc}: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;process&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(doc)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  case&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt; Empty&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;: fallbackDocument&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;  case&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; Error&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; {message, line}: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;logAndAbort&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(message, line)&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;};&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Because the compiler checks exhaustiveness at compile time, an agent cannot
accidentally skip a variant without the compiler raising an error. If an agent
later adds a case, every match against it must be updated.&lt;/p&gt;
&lt;p&gt;As Unmesh Joshi observed in his analysis of domain-specific languages and LLMs,
expressive abstractions construct a harness that guides the model. Restricting
valid operations to domain concepts leaves the model far less room to output
invalid states. Strict, high-level constructs let us do that in many cases in
a general programming langauge.&lt;/p&gt;
&lt;p&gt;This isn&#39;t anything new—ADT and pattern matching proponents have made this
argument for decades. Zena is just treading well-worn ground here, pulling
useful, well-designed features from other languages. It helps agents just as
much as it helps humans.&lt;/p&gt;
&lt;h2 id=&quot;reasoning-from-syntax-and-declarations&quot; tabindex=&quot;-1&quot;&gt;Reasoning from syntax and declarations &lt;a class=&quot;header-anchor&quot; href=&quot;#reasoning-from-syntax-and-declarations&quot; aria-label=&quot;Permalink to &amp;quot;reasoning-from-syntax-and-declarations&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Beyond control flow, an effective language for AI prioritizes local reasoning:
what can be deduced directly from the current file and explicit definitions.&lt;/p&gt;
&lt;h3 id=&quot;reasoning-from-syntax-explicit-identifiers&quot; tabindex=&quot;-1&quot;&gt;Reasoning from syntax: explicit identifiers &lt;a class=&quot;header-anchor&quot; href=&quot;#reasoning-from-syntax-explicit-identifiers&quot; aria-label=&quot;Permalink to &amp;quot;reasoning-from-syntax-explicit-identifiers&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In many languages, resolving where an identifier originates requires ambient
knowledge beyond the current file. In Go, every file in a directory implicitly
shares package scope without any import statements; in Java and Rust, wildcard
imports (&lt;code&gt;import foo.*&lt;/code&gt;, &lt;code&gt;use foo::*&lt;/code&gt;) pull external symbols into scope
anonymously. In either case, an identifier may be declared in an external file
with no indication of where it came from, forcing an agent into broad multi-file
searches that consume tool calls and context window space.&lt;/p&gt;
&lt;p&gt;Zena adopts JavaScript-style explicit module imports (&lt;code&gt;import { Map } from &#39;zena:collections&#39;&lt;/code&gt;) and explicit &lt;code&gt;this.&lt;/code&gt; for member access. Every external
identifier is named at the top of the file, and &lt;code&gt;this.&lt;/code&gt; unambiguously resolves
field access from local bindings. Both agents and human reviewers know
immediately where every symbol originates.&lt;/p&gt;
&lt;h3 id=&quot;reasoning-from-types-object-shapes-are-declared&quot; tabindex=&quot;-1&quot;&gt;Reasoning from types: object shapes are declared &lt;a class=&quot;header-anchor&quot; href=&quot;#reasoning-from-types-object-shapes-are-declared&quot; aria-label=&quot;Permalink to &amp;quot;reasoning-from-types-object-shapes-are-declared&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;In dynamic languages like JavaScript or Python, properties can be attached,
modified, or deleted at any time, forcing agents to trace all possible execution
paths.&lt;/p&gt;
&lt;p&gt;In Zena, object shapes are fixed and declared statically. Fields cannot be added
or deleted dynamically: what is declared is what exists at runtime. Classes
cannot be monkey-patched, &lt;code&gt;eval&lt;/code&gt; is prohibited, and there are no proxy property
interceptors where reading a property can trigger hidden side effects. When an
agent reads a type definition, that definition completely describes the object&#39;s
layout and behavior.&lt;/p&gt;
&lt;h2 id=&quot;garbage-collection-for-simpler-programs&quot; tabindex=&quot;-1&quot;&gt;Garbage collection for simpler programs &lt;a class=&quot;header-anchor&quot; href=&quot;#garbage-collection-for-simpler-programs&quot; aria-label=&quot;Permalink to &amp;quot;garbage-collection-for-simpler-programs&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;At this point, it&#39;s definitely debatable whether garbage collection or
Rust-style borrow checking is the better memory management solution for AI
coding agents.&lt;/p&gt;
&lt;p&gt;The main argument for borrow checking is usually in comparison to manual memory
management, where Rust is clearly better because it gives us memory safety. But
garbage collection also gives us memory safety and is a perfectly valid way to
do it.&lt;/p&gt;
&lt;p&gt;What&#39;s interesting to me is that GC is still much easier than Rust-style lifetime
annotations to read, reason about, and especially write. Garbage collection
requires less syntax, fewer annotations, and fewer rules to follow, leaving more
attention available for application logic. For the vast majority of software on
the application and server spectrum, modern garbage collection is more than fast
enough; for the minority of systems requiring zero-cost manual control, Rust
exists.&lt;/p&gt;
&lt;p&gt;Rust&#39;s borrow checker is also notoriously slow, and Zena is aiming for ultra-fast
compilation to speed up the agent coding loop.&lt;/p&gt;
&lt;p&gt;Interestingly, Zena &lt;em&gt;does&lt;/em&gt; include a borrow checker! It&#39;s not for memory
management, but for non-GC managed resources like file handles, sockets,
structured concurrency, and other external resources from the WASI Component
Model. But Zena&#39;s borrow checker is strictly lexical, uses standard generic
wrapper types (&lt;code&gt;Own&amp;lt;T&amp;gt;&lt;/code&gt;, &lt;code&gt;Borrow&amp;lt;T&amp;gt;&lt;/code&gt;), and is much easier to reason about.&lt;/p&gt;
&lt;h2 id=&quot;fast-iteration-loops-in-agentic-workflows&quot; tabindex=&quot;-1&quot;&gt;Fast Iteration Loops in Agentic Workflows &lt;a class=&quot;header-anchor&quot; href=&quot;#fast-iteration-loops-in-agentic-workflows&quot; aria-label=&quot;Permalink to &amp;quot;fast-iteration-loops-in-agentic-workflows&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Coding agents do not write software in a single pass; they operate in tight
feedback loops:&lt;/p&gt;
&lt;div class=&quot;language-text adaptive-theme&quot;&gt;&lt;button title=&quot;Copy Code&quot; class=&quot;copy&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;text&lt;/span&gt;&lt;pre class=&quot;shiki shiki-themes github-light github-dark code-block&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span&gt;Generate Code → Compile → Inspect Diagnostics → Fix Errors → Run Tests&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;In this loop, compiler latency directly limits agent throughput. When an agent
must wait twenty seconds for an optimizing C++ or Rust compiler to evaluate a
small edit, the iteration cycle stalls.&lt;/p&gt;
&lt;p&gt;Fast ahead-of-time compilation allows an agent to attempt an implementation,
receive immediate feedback, and self-correct within milliseconds. Zena&#39;s
compiler is architected for rapid single-pass type checking and intermediate
representation generation (ZIR), with incremental compilation ensuring
persistent compiler tools remain fast even on large projects.&lt;/p&gt;
&lt;h2 id=&quot;webassembly-as-an-ai-optimization&quot; tabindex=&quot;-1&quot;&gt;WebAssembly as an AI optimization &lt;a class=&quot;header-anchor&quot; href=&quot;#webassembly-as-an-ai-optimization&quot; aria-label=&quot;Permalink to &amp;quot;webassembly-as-an-ai-optimization&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Sandboxing is often discussed as an operational detail for executing code in
production. In an agentic development environment, sandboxing is central to both
the developer loop and the software architectures that AI enables.&lt;/p&gt;
&lt;p&gt;During development, agents generate and execute arbitrary code. If an agent
executes scripts with ambient operating system access, a mistaken shell command
or flawed file manipulation can alter host files or leak credentials. Running
generated code inside a sandbox protects the host system.&lt;/p&gt;
&lt;p&gt;Beyond the agent loop, AI changes how end users interact with software.
Applications increasingly allow users to generate custom workflows, automations,
and plugins on demand. These generated extensions run at varying levels of trust
and cannot be allowed unrestricted network or filesystem access.&lt;/p&gt;
&lt;p&gt;Traditional isolation mechanisms rely on operating system virtualization: Docker
containers or microVMs (such as Firecracker). While secure, these mechanisms
carry initialization latencies measured in hundreds of milliseconds and memory
overhead measured in tens of megabytes per instance.&lt;/p&gt;
&lt;p&gt;WebAssembly provides capability-based isolation with negligible overhead:
microsecond startup, kilobyte memory footprints, zero ambient authority (no
access to filesystem, clock, or network unless explicitly granted via WASI), and
universal portability across browsers, edge nodes, and servers. Because
fine-grained, secure sandboxing is required for both iterative agent development
and runtime application architectures, &lt;strong&gt;being optimized for WebAssembly is
being optimized for AI&lt;/strong&gt;.&lt;/p&gt;
&lt;h2 id=&quot;actionable-diagnostics-and-structured-tooling&quot; tabindex=&quot;-1&quot;&gt;Actionable Diagnostics and Structured Tooling &lt;a class=&quot;header-anchor&quot; href=&quot;#actionable-diagnostics-and-structured-tooling&quot; aria-label=&quot;Permalink to &amp;quot;actionable-diagnostics-and-structured-tooling&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;When a human developer encounters a compiler error, they read the message and
consult documentation. For a coding agent, the compiler&#39;s diagnostic becomes its
immediate input prompt for the next turn.&lt;/p&gt;
&lt;p&gt;Really clear, actionable error messages are essential for agents to self-correct
quickly. A diagnostic should explain &lt;em&gt;why&lt;/em&gt; something is an error rather than
just stating that it failed—for example, explaining that an assignment failed
because a variable was declared immutable with &lt;code&gt;let&lt;/code&gt;, and suggesting changing it
to &lt;code&gt;var&lt;/code&gt; if mutation was intended. When error messages provide actionable
context, agents can resolve issues in a single iteration step rather than
guessing or hallucinating speculative fixes.&lt;/p&gt;
&lt;p&gt;Tooling interfaces also need to adapt. Traditional Language Server Protocol
(LSP) features are built around text editor concepts: cursor positions, line and
character offsets, and active window buffers. This is an awkward interface for
agents, which navigate code programmatically rather than by simulating
keystrokes. Exposing compiler capabilities through structured CLI commands and
tool-calling APIs (like MCP) returning structured JSON—allowing agents to query
symbol definitions, find references, or inspect type hierarchies directly—lets
agents explore and manipulate codebases far more reliably.&lt;/p&gt;
&lt;h2 id=&quot;composition-over-monolithic-generation&quot; tabindex=&quot;-1&quot;&gt;Composition over Monolithic Generation &lt;a class=&quot;header-anchor&quot; href=&quot;#composition-over-monolithic-generation&quot; aria-label=&quot;Permalink to &amp;quot;composition-over-monolithic-generation&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;A capability of large language models is their ability to generate extensive
amounts of code from natural language descriptions. This can lead to the
assumption that software ecosystems will dissolve: if an agent can generate a
custom router, parser, or utility on demand, third-party libraries might seem
unnecessary.&lt;/p&gt;
&lt;p&gt;But generating every component from scratch creates long-term hazards: subtle
edge-case omissions, security vulnerabilities, and other tech debt debt.
Software engineering continues to require composition over generation: agents
should reuse high-quality, vetted libraries whenever available to conserve
context tokens and ensure correctness.&lt;/p&gt;
&lt;p&gt;Zena achieves ecosystem composition through the &lt;strong&gt;WebAssembly Component Model&lt;/strong&gt;.
Zena can compile to standard WASI components and directly import WIT files, so
libraries can be composed with components written in Rust, C, Go, or Python
without custom FFI glue code or shared runtime dependencies. And when a needed
library does not yet exist, then an agent can generate or port a working
implementation on the fly.&lt;/p&gt;
&lt;h3 id=&quot;the-language-creation-flywheel&quot; tabindex=&quot;-1&quot;&gt;The Language Creation Flywheel &lt;a class=&quot;header-anchor&quot; href=&quot;#the-language-creation-flywheel&quot; aria-label=&quot;Permalink to &amp;quot;the-language-creation-flywheel&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A final implication of AI assistance is the speed with which new language
ecosystems can develop. Historically, establishing a new programming language
required decades of human effort to write parsers, optimizing backends,
formatters, language servers, documentation, and standard libraries.&lt;/p&gt;
&lt;p&gt;With AI assistance, this timeline compresses dramatically. Zena itself is proof:
a self-hosted compiler, runtime, language server, and documentation site were
built and bootstrapped in months, with human architectural direction and review.
Far from ossifying the programming language landscape around legacy
technologies, AI makes it feasible to design, iterate, and deploy modern,
domain-optimized languages built specifically for emerging platforms like
WebAssembly.&lt;/p&gt;
&lt;h2 id=&quot;summary&quot; tabindex=&quot;-1&quot;&gt;Summary &lt;a class=&quot;header-anchor&quot; href=&quot;#summary&quot; aria-label=&quot;Permalink to &amp;quot;summary&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The rise of AI coding agents does not make programming language design obsolete;
it elevates the importance of sound design choices. When software generation
accelerates, the quality of our programming languages matter &lt;em&gt;more&lt;/em&gt;, even as the
bottleneck shifts to verification, sandboxing, and long-term maintainability.&lt;/p&gt;
&lt;p&gt;A programming language suited for this era provides:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Expressive, high-level abstractions&lt;/strong&gt; that constrain the state space and
minimize cognitive overhead for both models and human reviewers.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sound, strict typing&lt;/strong&gt; with explicit null safety and no unchecked escapes.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fast compilation&lt;/strong&gt; that enables responsive agent self-correction loops.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Structured programmatic tooling&lt;/strong&gt; that exposes compiler semantics directly
to agents.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Fine-grained, capability-based sandboxing&lt;/strong&gt; to execute generated code safely
during development and inside end-user applications.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;By targeting WebAssembly GC and building on sound static principles, Zena aims
to provide an ideal environment designed specifically for this next era of
software development.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>Zena Project Update #1: Optimizations, Async, WASI Components, and the Standard Library</title>
    <link href="https://zena-lang.dev/blog/2026/09/project-update-1/" rel="alternate" type="text/html"/>
    <id>https://zena-lang.dev/blog/2026/09/project-update-1/</id>
    <published>2026-09-25T15:00:00.000Z</published>
    <updated>2026-09-25T15:00:00.000Z</updated>
    <author>
      <name>Justin Fagnani</name>
      <uri>https://github.com/justinfagnani</uri>
    </author>
    <summary type="html">Our first project update covers the ongoing major workstreams across Zena: aggressive ZIR optimizations, structured async concurrency, deterministic ownership, WASI Preview 3 components, standard library restructuring, and the new website.</summary>
    <content type="html">&lt;p&gt;Welcome to the very first &lt;strong&gt;Zena Project Update&lt;/strong&gt;!&lt;/p&gt;
&lt;p&gt;Zena is evolving very rapidly, and yet still doesn&#39;t have its first release.
Rather than waiting for big milestone we&#39;re going to attempt weekly(ish) updates
to serve as an window into ongoing development. We&#39;ll cover things like language
design evolutions, compiler optimizations, standard library additions, and
developer tools.&lt;/p&gt;
&lt;p&gt;A few weeks ago, we achieved a huge milestone: &lt;strong&gt;retiring the TypeScript
bootstrap compiler&lt;/strong&gt;. The Zena compiler is now 100% self-hosted, written in Zena
itself. Before that we were porting language changes across two compiler and
for a time, three backends. Now, with the self-hosted foundation solid and the
intermediate representation (ZIR) in place, our pace has accelerated across
several major workstreams.&lt;/p&gt;
&lt;h2 id=&quot;1-compiler-optimizations&quot; tabindex=&quot;-1&quot;&gt;1. Compiler Optimizations &lt;a class=&quot;header-anchor&quot; href=&quot;#1-compiler-optimizations&quot; aria-label=&quot;Permalink to &amp;quot;1-compiler-optimizations&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Deleting the old AST-based backend and moving to &lt;strong&gt;ZIR&lt;/strong&gt; (our control-flow graph
and SSA intermediate representation) opened the door to aggressive, multi-pass
optimizations.&lt;/p&gt;
&lt;p&gt;We began by implementing the split passes for generators and &lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt;.
Once those landed, we built out a modular, multi-round optimization loop:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Global Value Numbering (GVN)&lt;/strong&gt;: Eliminates redundant calculations and loads.
If code computes the same value twice (like &lt;code&gt;a + b&lt;/code&gt;) or reads the same
immutable field repeatedly, GVN replaces subsequent occurrences with the first
result, deleting duplicate instructions from the output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Inlining&lt;/strong&gt;: Copies a called function&#39;s body directly into the caller. This
eliminates function-call overhead and exposes the callee&#39;s code to surrounding
optimizations.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Devirtualization&lt;/strong&gt;: Replaces indirect, dynamic method lookups (vtable
dispatches) with direct function calls whenever the concrete class of an
object can be determined at compile time.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Scalar Replacement of Aggregates (SRoA)&lt;/strong&gt;: Dissolves short-lived heap
objects into individual local variables. If an object is allocated locally and
never escapes the function (like an iterator), SRoA breaks its fields apart
into SSA registers, completely eliminating the heap allocation.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Jump Threading &amp;amp; Constant Propagation (SCCP)&lt;/strong&gt;: Evaluates branches and
conditional checks whose values are known at compile time, bypassing branch
diamonds and deleting unreachable dead paths.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Loop-Invariant Code Motion (LICM)&lt;/strong&gt;: Identifies computations inside a loop
that produce the exact same result on every iteration and hoists them before
the loop, executing them once instead of on every iteration.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Signature Specialization&lt;/strong&gt;: When a function accepting an interface is
consistently called with the same concrete type, the compiler creates a
specialized copy expecting that type, opening the door for direct calls and
further inlining.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Dead-Code &amp;amp; Vtable Harvesting&lt;/strong&gt;: Sweeps through the module to delete
functions, types, and vtable slots that became unreferenced after inlining and
devirtualization, shrinking the final WebAssembly binary.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;results&quot; tabindex=&quot;-1&quot;&gt;Results &lt;a class=&quot;header-anchor&quot; href=&quot;#results&quot; aria-label=&quot;Permalink to &amp;quot;results&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h3&gt;
&lt;h4 id=&quot;iterator-protocol-evaporation&quot; tabindex=&quot;-1&quot;&gt;Iterator Protocol Evaporation &lt;a class=&quot;header-anchor&quot; href=&quot;#iterator-protocol-evaporation&quot; aria-label=&quot;Permalink to &amp;quot;iterator-protocol-evaporation&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;One of our primary optimization goals is &lt;strong&gt;iterator protocol evaporation&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;In languages with dynamic dispatch, iterating over a custom collection using a
&lt;code&gt;for-in&lt;/code&gt; loop usually incurs significant overhead: allocating an iterator
object, calling &lt;code&gt;[Iterable.iterator]()&lt;/code&gt;, and performing virtual &lt;code&gt;next()&lt;/code&gt; calls
on every iteration. While many compilers add special-case fast paths hardcoded
for built-in arrays, user-defined collections suffer.&lt;/p&gt;
&lt;p&gt;In Zena, our optimizer takes the general iterator protocol:&lt;/p&gt;
&lt;div class=&quot;language-zena adaptive-theme&quot;&gt;&lt;button title=&quot;Copy Code&quot; class=&quot;copy&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;zena&lt;/span&gt;&lt;pre class=&quot;shiki shiki-themes github-light github-dark code-block&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;for&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; (&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; item &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;in&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; myCollection) {&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;  process&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;(item);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;}&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;and runs it through devirtualization, inlining, and SRoA. The iterator object
allocation dissolves completely, the &lt;code&gt;.next()&lt;/code&gt; calls inline directly, and the
iterator&#39;s internal index becomes a plain, loop-carried SSA variable. The
general abstraction evaporates down to the exact performance of a hand-written
while loop—without any special-cased compiler hacks for specific collection
types.&lt;/p&gt;
&lt;h4 id=&quot;map-fusion&quot; tabindex=&quot;-1&quot;&gt;&lt;code&gt;.map()&lt;/code&gt; Fusion &lt;a class=&quot;header-anchor&quot; href=&quot;#map-fusion&quot; aria-label=&quot;Permalink to &amp;quot;map-fusion&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;Higher-order collection methods like &lt;code&gt;.map()&lt;/code&gt; and &lt;code&gt;.filter()&lt;/code&gt; frequently create
performance penalties due to temporary array allocations and closure creation.&lt;/p&gt;
&lt;p&gt;Through the combination of interface devirtualization, inlining, and escape
analysis, a call like:&lt;/p&gt;
&lt;div class=&quot;language-zena adaptive-theme&quot;&gt;&lt;button title=&quot;Copy Code&quot; class=&quot;copy&quot;&gt;&lt;/button&gt;&lt;span class=&quot;lang&quot;&gt;zena&lt;/span&gt;&lt;pre class=&quot;shiki shiki-themes github-light github-dark code-block&quot; style=&quot;--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e&quot; tabindex=&quot;0&quot;&gt;&lt;code&gt;&lt;span class=&quot;line&quot;&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;let&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; ys &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; xs.&lt;/span&gt;&lt;span style=&quot;--shiki-light:#6F42C1;--shiki-dark:#B392F0&quot;&gt;map&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;((x: &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;i32&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt;): &lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt;i32&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; =&gt;&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; x &lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt;*&lt;/span&gt;&lt;span style=&quot;--shiki-light:#005CC5;--shiki-dark:#79B8FF&quot;&gt; 3&lt;/span&gt;&lt;span style=&quot;--shiki-light:#D73A49;--shiki-dark:#F97583&quot;&gt; +&lt;/span&gt;&lt;span style=&quot;--shiki-light:#24292E;--shiki-dark:#E1E4E8&quot;&gt; offset);&lt;/span&gt;&lt;/span&gt;
&lt;span class=&quot;line&quot;&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;can inline &lt;code&gt;map&lt;/code&gt;, invoke the closure body directly as a straight-line scalar
operation, and avoid heap-allocating the closure environment entirely. In
microbenchmarks, this brings functional-style chained expressions down to the
equivalent of hand-written loops.&lt;/p&gt;
&lt;h4 id=&quot;measurements&quot; tabindex=&quot;-1&quot;&gt;Measurements &lt;a class=&quot;header-anchor&quot; href=&quot;#measurements&quot; aria-label=&quot;Permalink to &amp;quot;measurements&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;To measure the real-world impact of these passes, our benchmark suite pairs
high-level idiomatic abstractions against hand-written imperative baselines:&lt;/p&gt;
&lt;div class=&quot;no-zebra benchmark-table&quot;&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Workload&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Optimization Level&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Binary Size&lt;/th&gt;
&lt;th style=&quot;text-align:left&quot;&gt;Runtime (Wasmtime)&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;&lt;code&gt;iter-protocol&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;for-in&lt;/code&gt; over custom &lt;code&gt;Iterable&lt;/code&gt;)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;code&gt;-O0&lt;/code&gt; (Unoptimized)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;3.6 KB&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;106 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;&lt;code&gt;-O2&lt;/code&gt; (Optimized)&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;221 B&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;17 ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;&lt;code&gt;iter-loop&lt;/code&gt; (Hand-written &lt;code&gt;while&lt;/code&gt; loop baseline)&lt;/em&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;Baseline&lt;/em&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;224 B&lt;/em&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;18 ms&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;&lt;code&gt;map-fusion&lt;/code&gt;&lt;/strong&gt; (&lt;code&gt;array.map()&lt;/code&gt; with closure literal)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;code&gt;-O0&lt;/code&gt; (Unoptimized)&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;12.0 KB&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;200 ms&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;&lt;code&gt;-O2&lt;/code&gt; (Optimized)&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;236 B&lt;/strong&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;strong&gt;20 ms&lt;/strong&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;&lt;code&gt;map-loop&lt;/code&gt; (Hand-written loop without closure)&lt;/em&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;Baseline&lt;/em&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;247 B&lt;/em&gt;&lt;/td&gt;
&lt;td style=&quot;text-align:left&quot;&gt;&lt;em&gt;20 ms&lt;/em&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;/div&gt;
&lt;p&gt;At &lt;code&gt;-O2&lt;/code&gt;, the general iterator protocol drops from 3.6 KB to just 221 bytes and
runs &lt;strong&gt;over 6× faster&lt;/strong&gt;—achieving exact parity with the hand-written index loop.
Similarly, higher-order &lt;code&gt;.map()&lt;/code&gt; with a closure drops from 12 KB to 236 bytes
and runs &lt;strong&gt;10× faster&lt;/strong&gt;, erasing the closure allocation overhead entirely.&lt;/p&gt;
&lt;h4 id=&quot;the-compiler-as-a-benchmark&quot; tabindex=&quot;-1&quot;&gt;The Compiler as a Benchmark &lt;a class=&quot;header-anchor&quot; href=&quot;#the-compiler-as-a-benchmark&quot; aria-label=&quot;Permalink to &amp;quot;the-compiler-as-a-benchmark&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h4&gt;
&lt;p&gt;The ultimate stress test for the optimizer is compiling the Zena compiler
itself. Comparing the self-hosted compiler built at the lowest optimization
level (&lt;code&gt;-O0&lt;/code&gt;) against the fully optimized pipeline (&lt;code&gt;-O2&lt;/code&gt;) highlights the
compound effect of these passes on a large, real-world codebase:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Binary Size&lt;/strong&gt;: Compiling the compiler at &lt;code&gt;-O0&lt;/code&gt; produces a 3.1MB WebAssembly
binary. With the full ZIR optimization pipeline, the binary drops to
&lt;strong&gt;2.6MB&lt;/strong&gt;—a &lt;strong&gt;500KB (~16%) reduction&lt;/strong&gt; across the compiler&#39;s codebase, even
after aggressive inlining and specialization that increase binary output.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Compiler Throughput&lt;/strong&gt;: Because the compiler is written in Zena, optimizing
the compiler speeds up compilation itself. Compiling benchmark programs with
the optimized compiler binary runs &lt;strong&gt;over 5× faster&lt;/strong&gt; than running the
unoptimized compiler binary (e.g. compiling the &lt;code&gt;sieve&lt;/code&gt; benchmark drops from
7.7s to 1.4s).&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;2-async-structured-concurrency&quot; tabindex=&quot;-1&quot;&gt;2. Async &amp;amp; Structured Concurrency &lt;a class=&quot;header-anchor&quot; href=&quot;#2-async-structured-concurrency&quot; aria-label=&quot;Permalink to &amp;quot;2-async-structured-concurrency&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Asynchronous execution is a first-class citizen in Zena. We compile &lt;code&gt;async&lt;/code&gt;
functions into frame-based suspending state machines that execute over
cooperative microtask queues.&lt;/p&gt;
&lt;p&gt;Recently, we&#39;ve landed several critical primitives for &lt;strong&gt;structured
concurrency&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;CancelScope&lt;/code&gt;&lt;/strong&gt;: Provides hierarchical cancellation trees. When an outer
scope cancels, that cancellation cascades down to all child tasks and scopes
automatically.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Wasm Exception Handling for Cancellation&lt;/strong&gt;: Cancellation raises on a
&lt;strong&gt;dedicated WebAssembly exception tag&lt;/strong&gt; rather than an ordinary &lt;code&gt;Error&lt;/code&gt;. This
cleanly unwinds the stack from any &lt;code&gt;await&lt;/code&gt; suspension point,
&lt;code&gt;checkCancellation()&lt;/code&gt;, or &lt;code&gt;raiseCancellation()&lt;/code&gt; call—running active &lt;code&gt;finally&lt;/code&gt;
blocks and &lt;code&gt;using&lt;/code&gt; cleanups deterministically without ordinary &lt;code&gt;catch&lt;/code&gt; blocks
accidentally swallowing the directive.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;TaskGroup&lt;/code&gt;&lt;/strong&gt;: Enables clean task spawning and nursery-style concurrency,
ensuring child tasks cannot outlive the parent lexical block or leak
background work.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Stream&amp;lt;T&amp;gt;&lt;/code&gt;&lt;/strong&gt;: First-class asynchronous generators and streams for
processing sequences of values over time.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&quot;scoping-cancellation-capabilities&quot; tabindex=&quot;-1&quot;&gt;Scoping Cancellation Capabilities &lt;a class=&quot;header-anchor&quot; href=&quot;#scoping-cancellation-capabilities&quot; aria-label=&quot;Permalink to &amp;quot;scoping-cancellation-capabilities&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Our next step in the async workstream is refining cancellation capabilities. We
are scoping the &lt;code&gt;.cancel()&lt;/code&gt; capability specifically to the creator of a
&lt;code&gt;CancelScope&lt;/code&gt; and make &lt;code&gt;CancelScope&lt;/code&gt; read only, ensuring that child code cannot
arbitrarily cancel parent scopes. This will likely involve closure cooperation
between &lt;code&gt;TaskGroup&lt;/code&gt; and &lt;code&gt;CancelScope&lt;/code&gt;, and possibly a generalization of
&lt;code&gt;CancelScope&lt;/code&gt; to an &lt;code&gt;AsyncScope&lt;/code&gt; that also supports nested microtask queues to
mitigate the infamous function coloring problem.&lt;/p&gt;
&lt;h2 id=&quot;3-deterministic-ownership-in-a-webassembly-gc-world&quot; tabindex=&quot;-1&quot;&gt;3. Deterministic Ownership in a WebAssembly GC World &lt;a class=&quot;header-anchor&quot; href=&quot;#3-deterministic-ownership-in-a-webassembly-gc-world&quot; aria-label=&quot;Permalink to &amp;quot;3-deterministic-ownership-in-a-webassembly-gc-world&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Zena is a garbage-collected language targeting WebAssembly GC. Most
values—strings, records, classes, closures—are reclaimed automatically by the
host engine.&lt;/p&gt;
&lt;p&gt;However, modern systems code must frequently interact with &lt;strong&gt;external host
resources&lt;/strong&gt;: file descriptors, sockets, linear memory buffers, and WebAssembly
Component Model resource handles (&lt;code&gt;own&amp;lt;T&amp;gt;&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;WebAssembly GC provides no object finalizers or destructors.&lt;/strong&gt; If a program
drops the last reference to an open file without explicitly closing it, that
resource leaks permanently in the host environment.&lt;/p&gt;
&lt;p&gt;To solve this, Zena provides a sound, compile-time &lt;strong&gt;ownership and resource
management system&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;resource&lt;/code&gt; classes&lt;/strong&gt;: Declared with the &lt;code&gt;resource&lt;/code&gt; modifier and implementing
the &lt;code&gt;Disposable&lt;/code&gt; protocol.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Linear Ownership (&lt;code&gt;Own&amp;lt;R&amp;gt;&lt;/code&gt;)&lt;/strong&gt;: A resource has exactly one owner at any time.
Assigning or passing an owned resource moves ownership; the compiler
statically ensures that unused resources are automatically disposed when their
scope ends.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Second-Class Borrows (&lt;code&gt;Borrow&amp;lt;R&amp;gt;&lt;/code&gt;)&lt;/strong&gt;: Owners can lend temporary,
non-consuming access to functions down the stack.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;Scoped&amp;lt;T&amp;gt;&lt;/code&gt; &amp;amp; &lt;code&gt;&amp;lt;scoped T&amp;gt;&lt;/code&gt; Type Parameters&lt;/strong&gt;: Stack-bound values (such as
borrowed resources or scoped futures) cannot be stored in heap collections or
captured by long-lived closures. The &lt;code&gt;&amp;lt;scoped T&amp;gt;&lt;/code&gt; generic constraint enforces
affine consumption across execution paths.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;em&gt;(Note on terminology: &lt;code&gt;Scoped&amp;lt;T&amp;gt;&lt;/code&gt; remains the type for stack-scoped values,
while &lt;code&gt;Lease&amp;lt;T&amp;gt;&lt;/code&gt; is our planned mechanism for exclusive, mutable borrows.)&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&quot;4-webassembly-components-wasi-preview-3&quot; tabindex=&quot;-1&quot;&gt;4. WebAssembly Components &amp;amp; WASI Preview 3 &lt;a class=&quot;header-anchor&quot; href=&quot;#4-webassembly-components-wasi-preview-3&quot; aria-label=&quot;Permalink to &amp;quot;4-webassembly-components-wasi-preview-3&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;The WebAssembly Component Model is the future of interoperable, modular Wasm.
Zena is designed from the ground up to be a premier guest language for
components.&lt;/p&gt;
&lt;p&gt;Recent component milestones include:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Direct WIT Support&lt;/strong&gt;: Thanks to our &lt;code&gt;@zena-lang/wit-parser&lt;/code&gt; package, Zena
can directly read WIT definitions and synthesize type-safe bindings for
imports and exports.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&amp;quot;Hello World&amp;quot; HTTP Service&lt;/strong&gt;: We now have working end-to-end component
examples, including a standalone HTTP service running under &lt;code&gt;wasmtime serve&lt;/code&gt;.
The service handles incoming HTTP requests and streams response text over
&lt;code&gt;wasi:http&lt;/code&gt; interfaces.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Components represent the natural convergence of our async and ownership
workstreams: WIT resource handles map directly to Zena&#39;s &lt;code&gt;Own&amp;lt;R&amp;gt;&lt;/code&gt; types, and
WASI async functions map directly to Zena&#39;s &lt;code&gt;Future&amp;lt;T&amp;gt;&lt;/code&gt;.&lt;/p&gt;
&lt;h3 id=&quot;moving-from-wasi-p1-to-p3&quot; tabindex=&quot;-1&quot;&gt;Moving from WASI p1 to p3 &lt;a class=&quot;header-anchor&quot; href=&quot;#moving-from-wasi-p1-to-p3&quot; aria-label=&quot;Permalink to &amp;quot;moving-from-wasi-p1-to-p3&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;Currently, Zena&#39;s command-line runtime uses WASI Preview 1 for basic stdio and
filesystem access. Over the coming milestones, we will migrate all of Zena&#39;s
core standard library I/O off WASI p1 and onto &lt;strong&gt;WASI Preview 3&lt;/strong&gt;. This will
unlock rich async streams of objects, enabling native support for graphical
windows and GPU APIs (like &lt;code&gt;wasi:webgpu&lt;/code&gt; and &lt;code&gt;wasi-gfx:surface&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;We are also designing an Express-like &lt;code&gt;zena:http&lt;/code&gt; framework to make writing HTTP
microservices in Zena feel effortless and modern.&lt;/p&gt;
&lt;h2 id=&quot;5-standard-library-restructuring&quot; tabindex=&quot;-1&quot;&gt;5. Standard Library Restructuring &lt;a class=&quot;header-anchor&quot; href=&quot;#5-standard-library-restructuring&quot; aria-label=&quot;Permalink to &amp;quot;5-standard-library-restructuring&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We finished a major reorganization of the standard library to streamline
namespaces. We also added several new libraries that Zena needs for it&#39;s own
tools:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:path&lt;/code&gt;&lt;/strong&gt;: Cross-platform path parsing, joining, normalization, and
segment traversal.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:args&lt;/code&gt;&lt;/strong&gt;: Declarative command-line argument parsing with typed flag
extraction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:glob&lt;/code&gt;&lt;/strong&gt;: High-performance glob matching featuring &lt;code&gt;GlobSet&lt;/code&gt; and brace
expansions (&lt;code&gt;src/**/*.{ts,zena}&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:url&lt;/code&gt;&lt;/strong&gt;: Comprehensive URL parsing and standard &lt;code&gt;URLPattern&lt;/code&gt; matching
with minimal binary size footprint.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:wasm&lt;/code&gt;&lt;/strong&gt;: Spawning, supervising, and precompiling child WebAssembly
modules from within Zena programs. These are based on Zena-specific host
imports, since there are no WASI interfaces for running new modules.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;See the new &lt;a href=&quot;https://zena-lang.dev/api/&quot;&gt;Standard Library Reference&lt;/a&gt; for the full list of APIs.&lt;/p&gt;
&lt;h2 id=&quot;6-cli-runtime-architecture-split&quot; tabindex=&quot;-1&quot;&gt;6. CLI &amp;amp; Runtime Architecture Split &lt;a class=&quot;header-anchor&quot; href=&quot;#6-cli-runtime-architecture-split&quot; aria-label=&quot;Permalink to &amp;quot;6-cli-runtime-architecture-split&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;As Zena&#39;s deployment targets expanded, bundling the compiler and runtime into a
single monolith became impractical. We restructured the CLI architecture into
modular layers:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;packages/zena-runtime&lt;/code&gt;&lt;/strong&gt;: A standalone Rust crate that configures the
Wasmtime engine, manages &lt;code&gt;.cwasm&lt;/code&gt; ahead-of-time compilation caches, and
provides host imports.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;packages/zena-run&lt;/code&gt;&lt;/strong&gt;: A lightweight binary dedicated solely to executing
compiled Zena modules without loading compiler machinery.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;packages/zena-cli&lt;/code&gt;&lt;/strong&gt;: The complete developer command-line interface for
compiling, running, testing, and benchmarking.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;packages/zb&lt;/code&gt;&lt;/strong&gt;: An early build orchestrator written entirely in Zena, based
on Google&#39;s &lt;a href=&quot;https://github.com/google/wireit&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Wireit npm script runner&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;7-documentation-website-playground&quot; tabindex=&quot;-1&quot;&gt;7. Documentation, Website, &amp;amp; Playground &lt;a class=&quot;header-anchor&quot; href=&quot;#7-documentation-website-playground&quot; aria-label=&quot;Permalink to &amp;quot;7-documentation-website-playground&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;We officially launched our new project documentation website at
&lt;a href=&quot;https://zena-lang.dev&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;zena-lang.dev&lt;/a&gt;!&lt;/p&gt;
&lt;p&gt;The new site includes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The Interactive Playground&lt;/strong&gt;: An in-browser editor
(&lt;a href=&quot;https://zena-lang.dev/playground/&quot;&gt;&lt;code&gt;&amp;lt;zena-playground&amp;gt;&lt;/code&gt;&lt;/a&gt;) running the full Zena compiler and
Language Server Protocol (LSP) in WebAssembly GC right inside your browser.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Auto-Generated API Reference&lt;/strong&gt;: The &lt;a href=&quot;https://zena-lang.dev/api/&quot;&gt;Standard Library Reference&lt;/a&gt; is
extracted directly from Zena source files and doc comments using
&lt;code&gt;@zena-lang/zenadoc&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;In-Depth Language Docs&lt;/strong&gt;: New reference guides covering
&lt;a href=&quot;https://zena-lang.dev/reference/classes/&quot;&gt;Classes&lt;/a&gt;, &lt;a href=&quot;https://zena-lang.dev/reference/streams/&quot;&gt;Streams&lt;/a&gt;,
&lt;a href=&quot;https://zena-lang.dev/reference/decorators/&quot;&gt;Decorators&lt;/a&gt;, and &lt;a href=&quot;https://zena-lang.dev/reference/ownership/&quot;&gt;Ownership&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Atom Feed&lt;/strong&gt;: Subscribe to project updates directly via
&lt;a href=&quot;https://zena-lang.dev/blog/feed.xml&quot;&gt;&lt;code&gt;/blog/feed.xml&lt;/code&gt;&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&quot;on-deck&quot; tabindex=&quot;-1&quot;&gt;On Deck &lt;a class=&quot;header-anchor&quot; href=&quot;#on-deck&quot; aria-label=&quot;Permalink to &amp;quot;on-deck&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here is a glimpse of what&#39;s currently in progress for upcoming updates:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Hybrid Sync/Async Iteration Protocol&lt;/strong&gt;: Unifying synchronous and
asynchronous iteration protocols for optimal performance and flexibility.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;WebAssembly &lt;code&gt;js-string-builtins&lt;/code&gt; Support&lt;/strong&gt;: Direct zero-copy string
interoperability when running in JavaScript environments.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;zena:http&lt;/code&gt; Framework&lt;/strong&gt;: An Express-inspired routing and middleware library
for WASI HTTP microservices.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Ownership Move Analysis&lt;/strong&gt;: Completing static borrow provenance and move
checking for resource classes.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Stay tuned for our next update! If you want to follow along, you can subscribe
to the blog&#39;s &lt;a href=&quot;https://zena-lang.dev/blog/feed.xml&quot;&gt;Atom feed&lt;/a&gt;, check out the &lt;a href=&quot;https://github.com/justinfagnani/zena&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;GitHub
repository&lt;/a&gt;, or join our conversations on
&lt;a href=&quot;https://bsky.app/profile/justinfagnani.com&quot; target=&quot;_blank&quot; rel=&quot;noreferrer&quot;&gt;Bluesky&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>What&#39;s in a Name?</title>
    <link href="https://zena-lang.dev/blog/2026/09/whats-in-a-name/" rel="alternate" type="text/html"/>
    <id>https://zena-lang.dev/blog/2026/09/whats-in-a-name/</id>
    <published>2026-09-24T12:00:00.000Z</published>
    <updated>2026-09-24T12:00:00.000Z</updated>
    <author>
      <name>Justin Fagnani</name>
      <uri>https://github.com/justinfagnani</uri>
    </author>
    <summary type="html">Where the name &quot;Zena&quot; comes from, the ancient Greek concept of xenia (guest-friendship), and what it means to be a great guest language for WebAssembly.</summary>
    <content type="html">&lt;p&gt;People often ask where the name &amp;quot;Zena&amp;quot; comes from.&lt;/p&gt;
&lt;p&gt;The name draws inspiration from the ancient Greek concept of &lt;strong&gt;xenia&lt;/strong&gt; (ξενία):&lt;/p&gt;
&lt;div class=&quot;dictionary-card&quot;&gt;
  &lt;div class=&quot;dictionary-header&quot;&gt;
    &lt;span class=&quot;dictionary-word&quot;&gt;xe·ni·a&lt;/span&gt;
    &lt;span class=&quot;dictionary-pronunciation&quot;&gt;/zɛˈniː.ə/&lt;/span&gt;
    &lt;span class=&quot;dictionary-pos&quot;&gt;noun&lt;/span&gt;
    &lt;span class=&quot;dictionary-etymology&quot;&gt;(Ancient Greek: &lt;strong&gt;ξενία&lt;/strong&gt;, from &lt;em&gt;ξένος&lt;/em&gt;, guest/stranger)&lt;/span&gt;
  &lt;/div&gt;
  &lt;ol class=&quot;dictionary-senses&quot;&gt;
    &lt;li&gt;The ancient Greek sacred law and custom of &lt;strong&gt;guest-friendship&lt;/strong&gt;: hospitality, protection, and generosity extended to travelers and guests far from home.&lt;/li&gt;
    &lt;li&gt;A reciprocal relationship of mutual courtesy between host and guest, obligating the guest to respect the host’s house, customs, and boundaries.&lt;/li&gt;
  &lt;/ol&gt;
&lt;/div&gt;
&lt;p&gt;In WebAssembly, the execution environment (a browser, Node.js, Wasmtime, or an
edge runtime) is the &lt;strong&gt;host&lt;/strong&gt;, and the WebAssembly module executing within it is
the &lt;strong&gt;guest&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;Since Zena only targets WebAssembly it is inherently a guest language, and from
the very beginning was designed to be a &lt;strong&gt;great guest&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Aligned semantics and types&lt;/strong&gt;: Zena&#39;s low-level semantics and types —
primitives, references, functions, nullability and mutability, operations,
field access, garbage collection, and more — are designed to mirror Wasm GC as
much as possible, with as little indirection, emitted bytecode, and runtime
overhead as possible.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Native Wasm GC&lt;/strong&gt;: Zena was created specifically for WebAssembly GC, so it
doesn&#39;t bring its own garbage collector or memory management, and seamlessly
integrates with GC-based hosts like JavaScript and the DOM.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Thoughtful interop&lt;/strong&gt;: Integrated WASI p3 component support, direct WIT
imports, strings that can use host encodings, JS interop, virtual libraries
that change per host environment, a borrow checking system for external
resources... Zena knows that to be a good guest means to be flexible and adapt
to your host.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Most languages running in WebAssembly today were originally designed for their
own virtual machine, interpreter, or compiler targeting native executables with
few runtime restrictions. To run in Wasm, they naturally need to bring along
parts of their runtime—like a custom garbage collector, custom function call or
property access logic, runtime type information, or mutable classes—resulting in
larger bundles and heavier interop layers. That isn&#39;t a defect in their design;
they were just designed for a different execution environment.&lt;/p&gt;
&lt;p&gt;Zena has the benefit of a clean slate and of being designed specifically for the
Wasm GC host environment, letting it deliver high performance, compact binaries,
and seamless interop.&lt;/p&gt;
&lt;h2 id=&quot;and-yes-the-warrior-princess&quot; tabindex=&quot;-1&quot;&gt;And yes, the Warrior Princess &lt;a class=&quot;header-anchor&quot; href=&quot;#and-yes-the-warrior-princess&quot; aria-label=&quot;Permalink to &amp;quot;and-yes-the-warrior-princess&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Whenever I tell someone about Zena, another connection inevitably comes up:
&lt;em&gt;like Xena: Warrior Princess?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;While &lt;em&gt;xenia&lt;/em&gt; was the real etymological spark, we&#39;ll gladly take the
association.&lt;/p&gt;
&lt;p&gt;In the show, Xena was a wandering warrior with no permanent home - she was a
perpetual guest across the ancient world. But crucially, Xena was a &lt;em&gt;good&lt;/em&gt;
guest. She respected hospitality, defended her hosts from harm, and stood up
against those who violated the laws of hospitality.&lt;/p&gt;
&lt;figure class=&quot;blog-post-figure&quot;&gt;
  &lt;img src=&quot;https://zena-lang.dev/images/blog/xena-warrior-princess.jpg&quot; alt=&quot;Lucy Lawless as Xena: Warrior Princess holding a flaming torch&quot; class=&quot;blog-post-image&quot; loading=&quot;lazy&quot; /&gt;
  &lt;figcaption class=&quot;blog-post-caption&quot;&gt;A good guest who knows how to handle a challenge.&lt;/figcaption&gt;
&lt;/figure&gt;
&lt;p&gt;Zena brings that same spirit to WebAssembly: lightweight, respectful of its
host, fast, and designed to fit naturally into the WebAssembly ecosystem.&lt;/p&gt;
&lt;p&gt;If you want to read more on how Zena makes a great WebAssembly guest language,
check out the (draft) &lt;a href=&quot;https://zena-lang.dev/guide/web-assembly/&quot;&gt;WebAssembly&lt;/a&gt; page in the
guide, as well as our detailed catalog of
&lt;a href=&quot;https://zena-lang.dev/development/design/wasm-alignment/&quot;&gt;WebAssembly alignment&lt;/a&gt; design decisions.&lt;/p&gt;
&lt;!--
Zena also benefits from
modern programming language trends where the traditionally separate worlds of
dynamic and static languages converge more and more on static types and
ahead-of-time compilation form static languages, but type inference and pleasant
high-level syntax that makes the languages &quot;feel&quot; dynamic.

This benefit of hindsight and going after other trailblazers lets Zena deliver
high performance, compact binaries, sound typing while feeling right at home wherever Wasm
runs.
--&gt;
</content>
  </entry>
  <entry>
    <title>Hello, World: Welcome to the Zena Blog</title>
    <link href="https://zena-lang.dev/blog/2026/09/hello-world/" rel="alternate" type="text/html"/>
    <id>https://zena-lang.dev/blog/2026/09/hello-world/</id>
    <published>2026-09-24T09:00:00.000Z</published>
    <updated>2026-09-24T09:00:00.000Z</updated>
    <author>
      <name>Justin Fagnani</name>
      <uri>https://github.com/justinfagnani</uri>
    </author>
    <summary type="html">Welcome to the Zena blog, where we will share project updates, design deep dives, and tutorials for the Zena programming language.</summary>
    <content type="html">&lt;p&gt;Welcome to the Zena blog!&lt;/p&gt;
&lt;p&gt;Zena is a statically typed programming language purpose-built for &lt;strong&gt;WebAssembly
GC&lt;/strong&gt;. It combines familiar syntax from TypeScript, Dart, Swift, and Scala with a
sound type system, immutability by default, and ahead-of-time compilation to
compact, fast Wasm binaries.&lt;/p&gt;
&lt;p&gt;We&#39;ll be using this space to share:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Project updates&lt;/strong&gt;: Language evolution, compiler milestones, and standard
library releases.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Design deep dives&lt;/strong&gt;: Technical write-ups explaining the architectural
decisions behind the Zena language.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Tutorials&lt;/strong&gt;: Practical guides for building libraries, web applications, and
WASI components.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Zena is not just a TypeScript clone for WebAssembly, it makes some very
meaningful additions and departures, so there&#39;s a lot to write about!&lt;/p&gt;
&lt;h2 id=&quot;a-quick-example-of-zena&quot; tabindex=&quot;-1&quot;&gt;A quick example of Zena &lt;a class=&quot;header-anchor&quot; href=&quot;#a-quick-example-of-zena&quot; aria-label=&quot;Permalink to &amp;quot;a-quick-example-of-zena&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;Here is a quick look at what writing Zena feels like. You can run and edit it
right in your browser:&lt;/p&gt;
&lt;zena-playground vertical&gt;
  &lt;script type=&quot;sample/zena&quot; filename=&quot;main.zena&quot;&gt;
    class Greeting(message: String) {
      greet(name: String) {
        console.log(`${this.message}, ${name}!`);
      }
    }

    export function main() {
      let greeting = new Greeting(&#39;Hello, World&#39;);
      greeting.greet(&#39;Zena&#39;);
    }

  &lt;/script&gt;
&lt;/zena-playground&gt;
&lt;p&gt;The Zena compiler and LSP loaded with the playground and weigh in at about
2.3MB.&lt;/p&gt;
&lt;h2 id=&quot;explore-further&quot; tabindex=&quot;-1&quot;&gt;Explore further &lt;a class=&quot;header-anchor&quot; href=&quot;#explore-further&quot; aria-label=&quot;Permalink to &amp;quot;explore-further&amp;quot;&quot;&gt;&amp;ZeroWidthSpace;&lt;/a&gt;&lt;/h2&gt;
&lt;p&gt;If you&#39;d like to learn more about Zena:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Read through the &lt;a href=&quot;https://zena-lang.dev/reference/&quot;&gt;Language Reference&lt;/a&gt; for in-depth documentation
on Zena&#39;s syntax, type system, classes, and standard library.&lt;/li&gt;
&lt;li&gt;Walk through the &lt;a href=&quot;https://zena-lang.dev/guide/what-is-zena/&quot;&gt;Language Guide&lt;/a&gt; for an introduction to
the language, its design philosophy, and comparisons with TypeScript, Rust,
and Go.&lt;/li&gt;
&lt;li&gt;Jump into the full &lt;a href=&quot;https://zena-lang.dev/playground/&quot;&gt;Playground&lt;/a&gt; to explore interactive
multi-file examples and test your own code in WebAssembly GC.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Stay tuned for our upcoming posts as we explore language features, compiler
benchmarks, and the roadmap ahead!&lt;/p&gt;
</content>
  </entry>
</feed>



