Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

// request.cf · coarse context

A page that knows where it met you.

Only coarse request metadata is shown. This demo does not display or persist visitor IP addresses.

Country
US
Cloudflare location
CMH
Connection
HTTP/2
Language
Not provided

Ray ID: a458a75939e03334

Jump to content

Draft:Zen C (programming language)

From Wikipedia, the free encyclopedia
  • Comment: We need independent refs. Stuartyeates (talk) 07:30, 30 June 2026 (UTC)

Zen C
ParadigmMulti-paradigm: Imperative, data-oriented, procedural
FamilyC
Designed byZuhaitz Méndez Fernández de Aránguiz[1]
First appearedJanuary 2026; 9 months ago (2026-01)
Stable release
v0.4.4 / March 21, 2026; 6 months ago (2026-03-21)[2]
Typing disciplineStatic, strong, inferred
OSWindows, macOS, Linux, FreeBSD
LicenseMIT License
Filename extensions.zc
Websitewww.zenc-lang.org
Influenced by
C, Rust, Zig

Zen C is a modern general-purpose, statically typed, compiled systems programming that compiles to human-readable GNU C/C11 code.[3][4] It was created by Zuhaitz Méndez Fernández de Aránguiz, who is from Spain. Zen C has advanced features like type inference, pattern matching, generics, traits, and async/await (with 100% C ABI compatibility).[4][5] It emphasizes: systems programming, manual memory management with RAII-like mechanisms (e.g. defer and autofree), and metaprogramming capabilities.[5]

History

[edit]

Zen C was created by the desire to have access to the C ecosystem, but with high-level language ergonomics and keeping C level raw performance. More expressive code can be written, that compiles to efficient human-readable C, allowing full integration with existing C tools and libraries. Modern features, without losing the desired control and compatibility that many developers want.[6][5][3]

Examples

[edit]

Memory Management

[edit]

Zen C uses manual memory management, combined with certain features to prevent leaks. There is no use of a garbage collector.[5][6]

  • autofree automatically frees a variable upon scope exit.
  • defer is used for cleanup code, when the current scope exits.
  • Double-free errors are prevented by treating types with destructors as "Resources" and strictly following Move Semantics by default (on assignment).
  • RAII (Resource Acquisition Is Initialization) is supported by implementing the Drop trait.
let d = fopen("doc.txt", "r");
defer fclose(d);

Object-Oriented Programming

[edit]

Zen C can create custom structures and methods.[5][6]

  • Shared behavior and interfaces are defined using trait
  • Methods are attached to structs (or types) using impl
  • Zen C uses composition via use keyword, instead of traditional inheritance, which allows developers to mix in fields from other structs.
struct Point {
    x: int;
    y: int;
}

impl Point {
    fn new(x: int, y: int) -> Self {
        return Point{x: x, y: y};
    }

    fn dist(self) -> float {
        return sqrt(.x * .x + .y * .y); 
    }
}

References

[edit]
  1. ↑ "Creator of Zen C". GitHub.
  2. ↑ "Latest". GitHub. 21 March 2026.
  3. 1 2 "Zen-C: New Transpiler Blends Modern Simplicity with C's Performance Power". webpronews.com. 12 January 2026.
  4. 1 2 "Zen-C, looks like a mixer of Rust + Zig". ziggit.dev. 12 January 2026.
  5. 1 2 3 4 5 "Zen C – A Better C Programming Language". gamefromscratch.com. 22 January 2026.
  6. 1 2 3 "Zen C". GitHub.